Passwordless Ssh

http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/

To log into host A from host B via SSH without a password:

On host B:
ssh-keygen (hit enter to accept default, and do not specify a pass-phrase. This create /home/tunnel/.ssh/id_rsa and /home/tunnel/.ssh/id_rsa.pub)
upload the id_rsa.pub to host A

On host A:
ssh somewhere. This create the .ssh directory with proper permission
cat id_rsa.pub » ~/.ssh/authorized_keys
chmod go-rwx /.ssh/authorized_keys

In order to avoid typing in your pass phrase each time ssh is invoked, a ssh-agent needs to be created and your pass phrase added.

ssh-agent $SHELL
ssh-add

Depending on your configuration, you might need to allow the user ‘tunnel’ in /etc/ssh/sshd_config on host A.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License