Using ssh Public/Private Keys
Creating public/private keys
- If you haven't already created a public/private key you can do this like so:
For more options you'll want to man ssh-keygen for details.ssh-keygen -t rsa -f ~/.ssh/id_rsa
- Include it in your authorized keys:
cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys
- Make sure permissions are set properly for it:
chmod 600 ~/.ssh/authorized_keys
Using keys for passwordless access
- Start an ssh agent:
eval `ssh-agent`
- Tell your ssh sessions to talk to this agent (enter passphrase if necessary):
- Either for a terminal:
ssh-add
- Or for an entire X session:
ssh-add < /dev/null
- Either for a terminal: