Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .