1

After adding new ssh key to .ssh/authorized_hosts I can no longer ssh to the machine without entering password.

What is even more funny is that the .ssh directory is suddenly inaccessible when I'm logged in via ssh (no direct console access):

pi@prodpi ~ $ ls -la
drw-------   2 pi   pi      4096 Mar 13  2015 .ssh

pi@prodpi ~ $ cd .ssh/
-bash: cd: .ssh/: Permission denied

pi@prodpi ~ $ ls .ssh/
ls: cannot access .ssh/authorized_keys: Permission denied
ls: cannot access .ssh/known_hosts: Permission denied
authorized_keys  known_hosts

pi@prodpi ~ $ sudo ls .ssh/
authorized_keys  known_hosts

The user is pi. What- if not directory permissions- could prevent me from accessing the folder as owner and potentially screw ssh login?

7

To enter a directory you have to set executable permission on it.

This should do it:

chmod u+x .ssh/

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.