« Posts tagged auth

SSH RSA1 Publickey Authentication Issues

Recently I’ve had to do some basic publickey authentication using Fedora 13 x86/x64, so I started by creating the id file using ssh-keygen -t rsa. After copying the *.pub file to the remote host and making sure the permissions are properly set, I tried connecting.

The pubkey authentication failed and the remote /var/log/secure wasn’t showing anything interesting. On the client I typed the following to troubleshoot further:

slave$ ssh -vvv user@master
Connecting to master…
...
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug3: Not a RSA1 key file /home/user/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '---- BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
...
debug2: key_type_from_name: unknown key type '---- END'
debug3: key_read: missing keytype
...
[pubkey auth fails]
slave$

I looked for an answer on Google, but nothing seemed to help. I was puzzled because I had accomplished the exact same thing on the exact same distro days earlier.

Well it turns out there is a bug in the openssh 5.4p1 (build 1) package that is shipped with the live CD image.

This fixed the issue immediately:

slave# yum update openssh

OpenSSH 5.4p1 (build 3) will be downloaded and everything should be fine.

To figure out exactly what fixed it, I downloaded the source RPM for build 3 and exacted it. The .spec file’s %changelog referenced the bug: #595935 which documents the same problem I encountered.

If you are building from source I’ve attached the .patch to this post. Good luck!

Download OpenSSH patch #595935