Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with SSH public key authentication
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Wedge_
Advocate
Advocate


Joined: 08 Aug 2002
Posts: 3614
Location: Scotland

PostPosted: Tue Sep 07, 2004 10:42 am    Post subject: Problem with SSH public key authentication Reply with quote

I've been trying to setup SSH to use public key authentication on my home network (2 desktops + laptop), along with ssh-agent / ssh-add, so that I don't have to type in passwords all the time. Most of what I did came from here.
The problem is that I can't login to one of the desktops from either of the other two machines, but every other combination works. ie
Desktop 1 ---> Desktop 2 - FAILS
Desktop 1 ---> Laptop - OK
Laptop ---> Desktop 1 - OK
Laptop ---> Desktop 2 - FAILS
Desktop 2 ---> Desktop 1 - OK
Desktop 2 ---> Laptop - OK
It appears to be a problem with Desktop 2, but I can't see any differences in my SSH configuration between the three systems. The login attempts don't actually fail as such, they just appear to hang and eventually timeout. If I use "ssh -vvv", the final debug message is "sent public key packet, waiting for reply", or something similar. I've tried running sshd with "-ddd" on the affected system, but I'm not at all familiar with the output it gives so I have no idea where it's going wrong.

Does anyone have any suggestions? I can post the debug output from the SSH client and daemon if it would help.
_________________
Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ
Back to top
View user's profile Send private message
n3mo
l33t
l33t


Joined: 28 Mar 2004
Posts: 657
Location: In a Cruel World

PostPosted: Tue Sep 07, 2004 10:51 am    Post subject: Reply with quote

From what you wrote seems that Desktop2 dosn't accept incoming connections, look at your firewall rules, verify that the ssh daemon is started, you could use netstat (on desktop2) and nmap (from the others pc) to verify that.
Back to top
View user's profile Send private message
noathustra
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2003
Posts: 129
Location: NYC

PostPosted: Tue Sep 07, 2004 10:51 am    Post subject: Reply with quote

Can you login to the problem desktop using password authentication? If so, you might try diff'ing the sshd_config file against one from either the working desktop or the laptop.
Back to top
View user's profile Send private message
fls
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2003
Posts: 111
Location: Germany

PostPosted: Tue Sep 07, 2004 11:42 am    Post subject: Reply with quote

It might be that you have tcp wrappers intalled on Desktop2 and didn´t set up /etc/hosts.allow properly.
If thats the case, you can look here for the solution.

It´s just a wild guess, though :)
Back to top
View user's profile Send private message
Wedge_
Advocate
Advocate


Joined: 08 Aug 2002
Posts: 3614
Location: Scotland

PostPosted: Tue Sep 07, 2004 12:23 pm    Post subject: Reply with quote

Thanks for the suggestions, but I eventually tracked it down to a permissions problem. The permissions on my home directory on Desktop2 were "rwxrwxr-x", and since other users could potentially write to the directory with those perms, it wasn't accepting the key stored in ~/.ssh as secure. Once I removed group write permission it started working straight away.
_________________
Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum