ssh login is one and done?

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

ssh login is one and done?

Postby feffer on Sun Jul 08, 2012 8:16 pm

Let me be clear up front, my main distro is LMDE, but I have many OSs on several computers. I use ssh extensively to connect and control them. Mostly, I use RSA key-pairs and password-less login. I've been doing this for a few years and haven't had any issues for a long time. However, I just added a new OS, the latest Kubuntu, to an open partition. As I said, I mainly work in LMDE, but I like to keep an eye on kde, thus the Kubuntu.

After setting up the keys etc, I logged in to my server, and everything seemed fine. I did some work, logged out, but later tried to log in again. No go?? I got the not allowed message. I tried other terminal tabs, restarting the ssh server, even closing and reopening the terminal.

If I re-import the key, it seems to work...exactly once? I'm completely baffled? I don't think this is a kde issue, because I'm using key-pairs and not the kwallet or anything like that. I'm asking here, because I a lot of smart people hang out here and as I've said already LMDE is my main OS.

Any ideas, how to deal with this?
feffer
Level 3
Level 3
 
Posts: 130
Joined: Mon Jul 07, 2008 7:49 pm

Linux Mint is funded by ads and donations.
 

Re: ssh login is one and done?

Postby feffer on Wed Jul 11, 2012 5:28 pm

Mystery solved...I think. The issue is with Kubuntu's new way of handling networking, I believe. I installed Ubuntu 12.04 LTS on an open partition and got the same problem. SSH login to other machines was erratic. Sometimes OK, sometimes failed with "Connection refused" message. An ssh key-pair setup should always succeed or always fail (if something is wrong).

With the new LTS release 12.04 Ubuntu/Kubuntu uses a different way of handling DNS. On my network, I use a router with Tomato firmware to resolve my local machines with it's built in dns resolver. But now Ubuntu is setting up another dns resolver locally. I think the two were interfering. The solution was simple. Open /etc/NetworkManager/NetworkManager.conf and comment out the line, "dns=dnsmasq"
Code: Select all
#vi /etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile
#dns=dnsmasq

no-auto-default="machine number",

[ifupdown]
managed=false

After doing this on the two installs, ssh login is successful every time -- knock on wood ;-)

Hope this helps someone else

Cheers,
feffer
feffer
Level 3
Level 3
 
Posts: 130
Joined: Mon Jul 07, 2008 7:49 pm

Re: ssh login is one and done?

Postby Habitual on Wed Jul 11, 2012 5:38 pm

That's some pretty good detective work. 8) 8)

Props!
What's a landing but a take off in reverse?
My DorkBlog
User avatar
Habitual
Level 7
Level 7
 
Posts: 1998
Joined: Sun Nov 21, 2010 8:31 pm
Location: Slackware


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 1 guest