ssh2 login with public key - not working

Laszlo Nagy gandalf at shopzeus.com
Thu Aug 30 11:22:59 PDT 2007


>
> Have you checked /var/log/auth.log on machine to which you are trying to
> connect?
>   
It contains nothing except:

Aug 30 13:54:19 box1 sshd[8199]: Accepted publickey for user2 from 
81.1.19.245 port 54369 ssh2


Now here is what I did:

1. I deleted user2 with "rmuser user2", but I did not delete its home 
directory
2. I re-created the user

Now it is working! It was so confusing that I tried another thing. Then 
I tried this with root at box2:

rm -fr /root/.ssh
cp ~user2/.ssh /root
chown -R root:wheel /root/.ssh
chmod 700 /root/.ssh
chmod 600 /root/.ssh/*
chmod 700 /root
ssh -l user1 mybox

Same problem - not working.

Unfortunately, auth.log on box1 only prints a line when it accepts a 
public key. There are no auth failures because the problem occurs when 
ssh tries to determine the type of the authentication.

Do you have any idea why the recreation of the user solved the problem? 
And how it is possible that using exactly the same ssh config, the root 
user cannot login with a public key? (Obviously, I cannot recreate the 
root user....)

Thanks,

  Laszlo



More information about the freebsd-questions mailing list