How To Fix SSH Automatic Connection Problems
By Angsuman Chakraborty, Gaea News NetworkFriday, September 12, 2008
I was doing something very simple - connecting to my own machine (with ssh) without using password. That should be simple right?
I dutifully appended my id_dsa.pub to authorized_keys and expected that it would work. It didn’t. After pouring over /etc/sshd_config for several minutes I came up blank. My only option was to look in the log file ( /var/log/secure ). I found this strange error:
Authentication refused: bad ownership or modes for file /home/angsuman/.ssh/authorized_keys
The permissions for the file was 644. That was the problem. I just had to change it to 600 to fix the problem. This is a not so well-known security feature in ssh.
YOUR VIEW POINT