Monday, September 27, 2010

Mistakes while attempting Passwordless ssh

Frequently people run into problems when they attempt to configure a passwordless ssh between 2 servers.

There are plenty of tutorials available on the internet for passwordless ssh and hence, it is not in scope of this post. However, I would like to highlight mistakes which people make before wondering "why is it not working!!"?


1. People do not follow the tutorial completely and usually miss the last step!
chmod 644 authorized_keys
ssh does not like it when authorized_keys is open to other users. You could also use 600 instead of 644.

2.  A not-so-common mistake is to verify whether or not sshd is running, you could verify it using
ps -ef | grep sshd

3. If you want a bi-directional passwordless ssh, i.e Server A to Server B and Server B to Server A. Then, maybe you should repeat the tutorial again for Server B to Server A.