Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to ssh, scp, git fetch, etc. without a password. I saw the previous questions, and closed ones regarding this issue, but the suggestion seems to be to use ssh keys. However, after setting up ssh keys, I am still asked for my password (it's not asking for my private key password; it's asking for my login password). How am I supposed to set this up so that it only uses my private key for authentication?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

Set the permissions on ~/.ssh (0700) and its contents (0600) on both the client and server appropriately.

share|improve this answer
add comment

ssh is paranoid about ownership of the authorized_keys file. It is possible for someone other than root to change the file, then it won't use it. It check the whole directory tree, so if it is possible for someone to do something like replace your home directory or your .ssh directory it will not use it. Check the permissions from authorized_keys all the way down to /. None of these should be group or world writable without the sticky bit set. (Permissions on my /home directory is drwxrwxr-t. Ownership must be root or the user. Permissions on authorized_keys itself should not allow access by group or world.

Testing with ssh -v instead of ssh should help. Using ssh-copy-id to copy the key to the remote system is a good idea.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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