SSH with public and private keys |
created:09 Nov 2009 @ 09:41 am edited:09 Nov 2009 @ 09:57 am |
Well there is a nice simple solution!
- On the remote system (the one your connecting to) run `ssh-keygen -t rsa`. This will generate you an RSA key pair. It's best to keep them in the ~/.ssh/ directory.
- Copy the contents of ~/.ssh/id_rsa.pub into your local ~/.ssh/authorized_keys (if it doesn't exist, create it!). 1 host per line
- Connect with no user/password prompt! YAY!
This also works for scp (secure copy) which is great fun for scripts etc!
