Progrider

Programming discussion

Board index
Help · ✓ Resolved

ssh keeps asking for password even though I copied my key

Trying to log in to the school's little server. I used ssh-copy-id, and it said one key added. It still asks me for a password every time.

2 replies

Nearly always permissions. On the server: chmod go-w ~ chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys sshd ignores the file if your home directory is group-writable. ssh -v on your side will show whether it tried the key at all, and /var/log/auth.log on the server gives the reason.
It was the home directory, it was group writable. auth.log said "bad ownership or modes". Amazing that it just tells you. Thank you

Discussion resolved

This discussion is resolved. Its creator can reopen it to accept more replies.