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?
ssh login is one and done?
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
ssh login is one and done?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: ssh login is one and done?
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"
After doing this on the two installs, ssh login is successful every time -- knock on wood
Hope this helps someone else
Cheers,
feffer
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
Hope this helps someone else
Cheers,
feffer