User Tools

Site Tools


computing:linux:ssh_keys

Differences

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

Link to this comparison view

Next revision
Previous revision
computing:linux:ssh_keys [2011/12/13 12:50]
gcooper created
computing:linux:ssh_keys [2017/01/28 12:33] (current)
gcooper
Line 1: Line 1:
 ====== Set Up SSH Keys ====== ====== Set Up SSH Keys ======
 +
 +===== Common Use =====
  
 Use this command to set up your SSH key on a remote server that you log into frequently: Use this command to set up your SSH key on a remote server that you log into frequently:
  
 <file> <file>
-ssh-copy-id root@www.yourdomain.com+ssh-copy-id user@remote.host.name
 </file> </file>
  
-Or if the ''ssh-copy-id'' script is not available:+===== Without ssh-copy-id ===== 
 + 
 +If the ''ssh-copy-id'' script is not available:
  
 <file> <file>
-cat ~/.ssh/*.pub | ssh user@remote-system 'umask 077; cat >>.ssh/authorized_keys'+cat ~/.ssh/*.pub | ssh user@remote.host.name 'umask 077; cat >>.ssh/authorized_keys'
 </file> </file>
  
-or if SSH is on a non-standard port:+===== Non-Standard SSH Port =====
  
-cat ~/.ssh/*.pub | ssh -p 2222 root@www.sonoracomm.com 'umask 077; cat >>.ssh/authorized_keys'+If SSH is on a non-standard port:
  
-If no public key yet exists on the machine you will be using to make remote connections:+<file> 
 +ssh-copy-id -p 2222 user@remote.host.name 
 +</file> 
 +or: 
 +<file> 
 +cat ~/.ssh/*.pub | ssh -p 2222 root@remote.host.name 'umask 077; cat >>.ssh/authorized_keys' 
 +</file> 
 + 
 +===== Generate Public Key ===== 
 + 
 +If no public key yet exists on the machine you will be using to make remote connections, you'll need to create one.  This is only done once: 
 + 
 +<file> 
 +ssh-keygen -t rsa 
 +</file>
  
-ssh-keygen -t dsa+You probably want to just hit enter at the passphrase prompt.
computing/linux/ssh_keys.1323805828.txt.gz · Last modified: 2011/12/13 12:50 by gcooper