Announcement

Collapse
No announcement yet.

ssh erratic behavior

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ssh erratic behavior

    My environment. Multiple machines and OSes. Use openssh to move around and manage them. I have a peer to peer setup using key-pairs, so each machine can be both client or server. This seems fast and reliable; used it successfully for 3 years. I have a dedicated headless backup server running debian.

    The problem. Just replaced Kubuntu 11.04 on one partition with Kubuntu 12.04 LTS, and ssh is working erratically on it. Using the konsole on 12.04, initially I could log into my backup server and move around the network normally. After a while, I logged out, worked in 12.04 for a while and then tried to log back into the server. Now I got "connection refused."

    How I tried to fix it. Since it worked initially, my ssh setup, key-pairs etc must have been OK. But just in case, I re-sent my key-pairs, stopped and re-started ssh. I also tried restarting kubuntu. These efforts initially seemed to work. I was able to do ssh connections with my server from 4 open konsole tabs. I was able to login and logout and back in again. Seemed fixed; did some other tasks on 12.04, and tried ssh again. Now I got "connection refused" again. Thinking it might be an ssh process that had become a zombie, I tried "ps -e | grep ssh" which showed sshd, which I expected, and ssh-agent which I did not. I killed ssh-agent, and did a service restart on ssh. Now ssh once more worked and I could login to the backup server. But again this was not a permanent fix.

    Booting into other linux OSes showed that ssh still worked normally on them. Same for an iMac on the network. Also, ssh worked perfectly on the older Kubuntu 11.04 (now replaced). All this makes me think that there is something on 12.04 which is affecting ssh behavior. I don't think this could affect it, but the older kub 11.04 was 64-bit, and I replaced it with kub 12.04 32-bit (thought I better include this info just in case). Anyone have any ideas what could cause this erratic ssh behavior?

    #2
    I am not shure this will be of any help, but on my system from the moment I installed 12.04 a get this problem. 9 out of 10 times at startup or very short after I get a message saying: KNetAttach has stopped unexpectedly. As far as I can see KNetAttach plays a role in setting up SSH links. I have come across the same problem in posts on the Ubuntu forums. Apparently the support for SSH in 12.04 has become unstable. No solutions seem to have been posted yet.

    Comment


      #3
      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:
      #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

      Comment

      Working...
      X