Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Troubleshooting SSH problem

  1. #1
    Join Date
    Jun 2005
    Location
    Toronto
    Beans
    100

    Troubleshooting SSH problem

    I'm running Ubuntu 8.04 on a new Lenovo T61 Thinkpad. I have a problem using SSH to connect to the Linux network at my office. The connection can be established, but then freezes after a few moments. I've been trying to troubleshoot this issue for a while with no luck, but I have learned a few things which may shed some light on the issue:

    1. I've had this problem with many Linux distro's, running on various notebooks or desktop systems at home.
    2. I have no problem if I run PCLinuxOS on the same hardware - in fact this may be the only Distro I've used that does NOT have this problem. (Note: I don't want to use PCLinuxOS - I want to run Ubuntu)
    3. Lengthy Google searches always lead back to the same suggestion: change the MTU setting for the network adapter. I've tried this with many different MTU sizes, and it makes no difference
    4. I compared the default MTU settings on both Ubuntu and PCLinuxOS and they are the same: 1500. I think MTU can be ruled out.
    5. Makes no difference if I run with wireless or wired connection.
    6. There are slight differences in the version of OpenSSH on Ubuntu 8.04 and PCLinuxOS 2007: PCLinuxOS has OpenSSH 4.5p1, Ubuntu 8.04 has OpenSSH 4.7p1
    7. I tried using putty to make the SSH connection - this didn't help - same problem
    8. Running on PCLinuxOS, I start the SSH connection using Konsole which is a KDE application. Hmmmm... could this be the issue??? Installed Konsole on Ubuntu - no difference.
    9. Both distros have IPV6 enabled

    Again, to summarize - two different Linux distros running on the same hardware, behind the same router, connecting to the same external network, and using the same MTU settings. One works, the other does not.

    (By the way, I've had the same problem with Fedora, Suse, Slackware, Arch, etc etc. The only one the works for me is PCLinuxOS - AND I DON"T WANT TO RUN THAT. I'm not a big KDE fan...)

    What am I missing here? What to check next? Thanks in advance for any help!
    Registered Linux User: #182084 - July 2000
    http://counter.li.org/ | Ubuntu Hardy Heron 8.04

  2. #2
    Join Date
    Mar 2006
    Location
    San Francisco Bay Area
    Beans
    371
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Troubleshooting SSH problem

    There are some configuration options you could try in ~/.ssh/config.

    see: man ssh_config

    I'd recommend starting with:
    AddressFamily inet

    you also might try a different cipher:
    Ciphers 3des-cbc

    Do you have access to the ssh server? That's the place to turn on debugging. I had an Apple machine where I could start a second instance of sshd on a different port in debug mode, and I could see exactly what was happening when I connected with Ubuntu.

  3. #3
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,958
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Troubleshooting SSH problem

    This is really a tough problem. I would definitely stop using an ssh GUI client and head to the command line. I would definitely connect with ssh -vvv (3'v's) to provide verbose output, and then let the machine sit to see if any error messages popup when the process freezes.

    What exactly freezes, the internet connection or ssh? (Need to separate which is the culprit). When the ssh connection freezes, can you do a ping or use firefox or some other process to connect to the internet? What does dmesg show?

    Again way too many things could be causing the problem. Lets narrow the possibilities. Get rid of IPv6 if you don't need it also.

  4. #4
    Join Date
    Jun 2005
    Location
    Toronto
    Beans
    100

    Re: Troubleshooting SSH problem

    Thanks - interesting ideas. I found the ssh_config file in /etc/ssh - there was nothing in ~/.ssh except for the known_hosts file. I thought I would try replacing the Ubuntu ssh_config file with the PCLinuxOS file to see it that made any difference. Both files are mostly commented lines, with the only differences noted below:

    Ubuntu:
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

    PCLinuxOS:
    ForwardX11 yes
    ForwardX11Trusted yes
    Protocol 2,1
    StrictHostKeyChecking no

    So I tried using the ssh_config file from PCLinuxOS, but it didn't help. I also tried your suggestion regarding AddressFamily inet, but again this changed nothing. (Both the original ssh_config files had the AddressFamily line commented out.)

    I do have access to the ssh server, so tomorrow I'll try your suggestion about running another instance of sshd with verbose logging enabled. I'll also try bringing the Ubuntu notebook in to the office as I'm curious to see what happens when I ssh from the same subnet.

    Thanks again for your suggestions.
    Registered Linux User: #182084 - July 2000
    http://counter.li.org/ | Ubuntu Hardy Heron 8.04

  5. #5
    Join Date
    Jun 2005
    Location
    Toronto
    Beans
    100

    Re: Troubleshooting SSH problem

    Quote Originally Posted by kevdog View Post
    This is really a tough problem. I would definitely stop using an ssh GUI client and head to the command line. I would definitely connect with ssh -vvv (3'v's) to provide verbose output, and then let the machine sit to see if any error messages popup when the process freezes.

    What exactly freezes, the internet connection or ssh? (Need to separate which is the culprit). When the ssh connection freezes, can you do a ping or use firefox or some other process to connect to the internet? What does dmesg show?

    Again way too many things could be causing the problem. Lets narrow the possibilities. Get rid of IPv6 if you don't need it also.
    I normally do run from command line. Using putty (GUI client) was an experiment to see if anything changed. What I do is open an xterm (or Gnome Terminal or Konsole - makes no difference which) and type ssh <hostname>. I get the username & password prompts and login successfully. From there if I do something like 'ls -la' I'll get several lines of output and then the terminal freezes. That's it. Nothing brings it back to life. I can let it sit for a long time, but it's dead. By contrast, if I ssh using PCLinuxOS, I can work normally within the ssh shell. (Edit files, read text, run commands, whatever...)

    I tried your suggestion with ssh -vvv and there is indeed very verbose output as the connection is established. Once I do 'ls -la' however, the terminal freezes, and there is no further output. Other things that cause the freeze: cat some file, run top, basically execute anything that generates text output. Once a certain number of characters have been displayed the session freezes.

    Other than the frozen ssh session, all other functions on the notebook work normally. Web browsing, ftp, or any other network activity work normally. Only the ssh session in the terminal freezes. All other network traffic is flowing as normal.
    Registered Linux User: #182084 - July 2000
    http://counter.li.org/ | Ubuntu Hardy Heron 8.04

  6. #6
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,958
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Troubleshooting SSH problem

    I take it when your client terminal freezes -- the actual server it is connected to does not freeze. Seems like a challenging problem. No wireless involved correct. IPV6 deativated?

  7. #7
    Join Date
    Jun 2005
    Location
    Toronto
    Beans
    100

    Re: Troubleshooting SSH problem

    Quote Originally Posted by kevdog View Post
    I take it when your client terminal freezes -- the actual server it is connected to does not freeze. Seems like a challenging problem. No wireless involved correct. IPV6 deativated?
    Yes, that's correct. The server side is fine, it is the client that freezes.

    I didn't have much time today to work on this, but I did boot a notebook from the live CD and connect to the same server from within the LAN, and the connection was perfect and did NOT freeze. Which seems to take us back to issues with router hops, port forwarding, MTU sizes and so forth - but remember: from my home, running on identical hardware, from behind the same home router, and connecting to the same ssh server, PCLinuxOS works, and Ubuntu does not.

    That said, I seem to remember reading that there is some sort of reverse DNS lookup going on when connected with SSH. I will have to research this and see what the actual details are, as I am no doubt getting this completely wrong going by memory. Could the problem be something as simple as a different /etc/nsswitch.conf setup, or some other hostname resolution issue? The plot thickens...
    Registered Linux User: #182084 - July 2000
    http://counter.li.org/ | Ubuntu Hardy Heron 8.04

  8. #8
    Join Date
    Mar 2006
    Beans
    20
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Troubleshooting SSH problem

    Any progress on this? I have identical symptoms...

  9. #9
    Join Date
    Jun 2005
    Location
    Toronto
    Beans
    100

    Re: Troubleshooting SSH problem

    Quote Originally Posted by psquared89 View Post
    Any progress on this? I have identical symptoms...
    No progress to report. Just for the hell of it, I tried ssh from the command line on MAC OS X (another machine on my home network) SSH from the Mac works properly. I know this proves very little, but it does help once again to eliminate firewall/router issues.

    Please keep me posted if you have any luck troubleshooting this issue. Thanks.
    Registered Linux User: #182084 - July 2000
    http://counter.li.org/ | Ubuntu Hardy Heron 8.04

  10. #10
    Join Date
    Jun 2005
    Location
    Toronto
    Beans
    100

    Re: Troubleshooting SSH problem

    As another little experiment, I downloaded the PCLinuxOS Gnome 2008.1 Live CD. Guess what? This has the same problem as Ubuntu. Tried the PCLinuxOS 2007 KDe live CD again to confirm, and ssh worked properly and did not freeze.

    This couldn't actually come down to a KDE vs Gnome issue could it????
    Registered Linux User: #182084 - July 2000
    http://counter.li.org/ | Ubuntu Hardy Heron 8.04

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •