I'm setting up a remote server. The
sshd is configured to use publickey only. There are two accounts on the remote machine with identical
.ssh/authorized_keys, so that I can log in as either using the same key. One of the two is root, and when I try:
ssh -i /path/to/privatekey email@example.com
I get in, no problem. However, when I try the other (non-privelleged) user:
ssh -i /path/to/privatekey firstname.lastname@example.org
debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering DSA public key: /path/to/privatekey debug1: Authentications that can continue: publickey debug1: Trying private key: /path/to/privatekey **debug1: key_parse_private_pem: PEM_read_PrivateKey failed** debug1: read PEM private key done: type <unknown> Enter passphrase for key '/path/to/privatekey':
The asterisked line does not occur with the successful root@server login. This is also strange since
ssh-agent already has the passphrase for this key; I am not asked with the root@server login. The failed bob@server login ends:
debug1: read PEM private key done: type DSA debug1: Authentications that can continue: publickey debug1: No more authentication methods to try. Permission denied (publickey).
Permissions, etc. on
/home/bob/.ssh are correct [but no execute bit on .ssh directory, see comments]. This was actually a system upgrade/reinstall, and I have a backup of the previous
/etc including the
sshd configuration. I haven't changed anything (although when I allow password authentification, bob can get in), and this was how I was using the system before via git -- so I have a bunch of project
git remote ids keyed to use bob@server via ssh, and don't want to have to change those because I can't get
sshd to work the way it did previously...