linux_wiki:ssh_pub_priv_keys

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:ssh_pub_priv_keys [2014/12/08 20:40]
billdozor
linux_wiki:ssh_pub_priv_keys [2019/05/25 23:50] (current)
Line 1: Line 1:
 ====== SSH Pub/Priv Keys ====== ====== SSH Pub/Priv Keys ======
  
-Description: Create public/private key pair to login to remote systems with no password prompt.+**General Information**
  
-From the local client:+Create public/private key pair to login to remote systems with no password prompt.
  
-===== Create public/private key pair =====+**Checklist** 
 +  * Distro(s): Any 
 + 
 +---- 
 + 
 +===== From the local client ===== 
 + 
 +==== Create public/private key pair ====
 <code bash> <code bash>
 ssh-keygen -t rsa ssh-keygen -t rsa
Line 17: Line 24:
   * $HOME/.ssh/id_rsa.pub = public key (this will go on server)   * $HOME/.ssh/id_rsa.pub = public key (this will go on server)
  
-===== Put public key on remote server(s) =====+==== Put public key on remote server(s) ====
 <code bash> <code bash>
 ssh-copy-id -i $HOME/.ssh/id_rsa.pub username@server ssh-copy-id -i $HOME/.ssh/id_rsa.pub username@server
 </code> </code>
  
-If ssh-copy-id is not installed, use scp instead:+If ssh-copy-id is not installed, use scp instead
 <code bash> <code bash>
 scp $HOME/.ssh/id_rsa.pub username@server:~/tmp.pub scp $HOME/.ssh/id_rsa.pub username@server:~/tmp.pub
Line 30: Line 37:
 </code> </code>
  
-===== Ensure ssh-agent is running and add private key passphrase =====+==== Ensure ssh-agent is running and add private key passphrase ====
 <code bash> <code bash>
 eval $(ssh-agent) eval $(ssh-agent)
Line 37: Line 44:
 Enter private key passphrase to add private key to the ssh-agent. Enter private key passphrase to add private key to the ssh-agent.
  
-===== Login to server, no password prompt because of ssh-agent/ssh-add =====+==== Login to server, no password prompt because of ssh-agent/ssh-add ====
 <code bash> <code bash>
 ssh username@server ssh username@server
 </code> </code>
  • linux_wiki/ssh_pub_priv_keys.1418089232.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)