I was working on creating a launch configuration in Eclipse using an external tool which would be SSH. I needed to setup passwordless SSH connection to the remote machine. I had done it before but something had changed and I had to do it again, I followed the simple procedure that I found, but it wasn’t working for some reason. I finally found a small missing step which was not shown in many places at MickBlog. The trick for me was just to change the mode of authorized_keys to 644. So, keep this in mind if you ever need a similar setup. I iterate the procedure below:
. Type ssh-keygen -t rsa on the local machine and accept the default location for the file
. Enter a passphrase when prompted. You will be asked this instead of the password when you ssh to the remote machine. You may leave it blank but that would degrade security
. Enter the passphrase again
. Transfer the id_rsa.pub file to the remote machine (e.g. scp id_rsa.pub login@remoteip:~)
. On the remote machine type cat id_rsa.pub >> .ssh/authorized_keys
. On the remote machine type chmod 644 .ssh/authorized_keys
. When you ssh to the remote machine, you will be asked to enter your passphrase instead of the password. If you left the passphrase blank you will simply be logged in without entering anything