Passwordless Ssh

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/
upload the to host A

On host A:
ssh somewhere. This create the .ssh directory with proper permission
cat » ~/.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

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