User Tools

Site Tools


computing:linux:ssh_keys

This is an old revision of the document!


Set Up SSH Keys

Common Use

Use this command to set up your SSH key on a remote server that you log into frequently:

ssh-copy-id user@remote.host.name

Without ssh-copy-id

If the ssh-copy-id script is not available:

cat ~/.ssh/*.pub | ssh user@remote.host.name 'umask 077; cat >>.ssh/authorized_keys'

Non-Standard SSH Port

If SSH is on a non-standard port:

ssh-copy-id "user@remote.host.name -p 2222"

or:

cat ~/.ssh/*.pub | ssh -p 2222 root@remote.host.name 'umask 077; cat >>.ssh/authorized_keys'

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:

ssh-keygen -t dsa

You probably want to just hit enter at the passphrase prompt.

computing/linux/ssh_keys.1343666676.txt.gz · Last modified: 2012/07/30 10:44 by gcooper