Using 'ssh-keygen' to automatically log you into clusters from your workstation

From Docswiki
Revision as of 13:38, 13 May 2019 by Adk44 (talk | contribs) (Created page with "== Using ssh-copy-id == Just run the command ssh-copy-id [user@]machine for example, to ssh and scp to clust from your workstation, just issue the command ssh-copy-id clu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Using ssh-copy-id

Just run the command

ssh-copy-id [user@]machine

for example, to ssh and scp to clust from your workstation, just issue the command

ssh-copy-id clust

Using scp

1. # local$ ssh-keygen -t rsa

2. # local$ ssh-copy-id username@remote

3. # local$ ssh username@remote - Now instead of the normal password you should be asked for the password you entered for your rsa key. This isn't passwordless yet but shows that ssh is using the key.

4. # local$ ssh-add - type the passphrase for the RSA key. Now you will get passwordless login to remote until you log out of your workstation.

[Edited to change dsa keys to rsa keys throughout as there's some evidence that RSA is a better algorithm]