June 1, 2009

Can a shared home folder contain both the .ssh/authorized_keys and .ssh/id_rsa and .ssh/id_rsa.pub?

It used to be that I could share my home folder using NFS and then generate my id_rsa and id_rsa.pub, put the id_rsa.pub into my authorized_keys file and I could login to remote machines with no passwords.  It seems like something may have been updated in ssh recently that now prevents me from doing that.  

If I connect to a server where my home doesn't mount, I create the authorized_keys file and populate it and everythign works fine.  So, I know the keys work properly.  Am I not supposed to be able to use the same home folder for the local and remote home when using ssh?

 When I run this on a server that doesn't mount my home, the difference is that ssh -vvvv shows this:

debug1: Server accepts key: pkalg ssh-rsa blen 277

 So I can see the key is never accepted when mounting my home in both locations.  Any suggestions?

IPermissions issues on the files are more likely to cause issue. If you make...

IPermissions issues on the files are more likely to cause issue. If you make sure all of these files have permissions on 600 you should be fine in that regard.

James, I think that was it. I was changing permissions on my home folder for an entirely unrelated issue and I noticed ssh now suddenly works the way it used to. So it looks like permissions fixed it!

Like  (0 likes)

I do this daily with the latest red hat and fedora updates so I don't believe...

I do this daily with the latest red hat and fedora updates so I don't believe anything has changed in ssh. Permissions issues on the files are more likely to cause issue. If you make sure all of these files have permissions on 600 you should be fine in that regard.

You should also be able to see the cause of the issue by looking in /var/log/messages on the server you are logging into and searching for messages from sshd at the time you logged in.

I hope this helps,

James

Like  (0 likes)
Click Here!