Ssh Freezes

Home » CentOS » Ssh Freezes
CentOS 6 Comments

All too often, my SSH session will freeze. I’m fairly certain the problem is at my end. None of the tilde commands work. In particular, ~# and ~. are nonfunctional. I can write to ssh’s terminal window from another terminal window. If I kill the SSH process, I can SSH in again. The next time it happens, I will try another SSH session without killing the first one. dmesg did not show me anything interesting.

Any suggestions on how to diagnose?

6 thoughts on - Ssh Freezes

  • what OS/version are you ssh’ing from? what version of SSH is installed on this? [1]

    what OS/version are you ssh’ing to? what version of sshd is installed on this? [2]

    what network media is between these two hosts? anything out of the ordinary in the setup?

    [1] rpm -q openssh-clients – assuming this is a recent CentOS
    [2] rpm -q openssh-server ” ”

  • openssh-clients-5.3p1-111.el6.x86_64

    rpm not installed uname -a Linux mail 2.6.24-28-generic #1 SMP Fri Feb 11 17:36:45 UTC 2011 i686 GNU/Linux mail.cs.ndsu.nodak.edu is not controlled by me.

    Ethernet connection to CenturyLink router/DSL-modem. I hadn’t thought to check for anything interesting on the router. I’ll do that the next time it happens.

  • I had this a lot until I added to /etc/ssh/ssh_config

    ServerAliveInterval 15

    Now I rarely get it.

  • Did it complain at all?
    Mine does not, it just freezes.

    I can start another SSH session with the first one frozen.

  • I can remember having this sort of issue a while back. I believe it turned out that our PIX firewall was being a bit too aggressive in pruning what it thought were idle sessions. Adding the following to my
    ~/.ssh/config file seems to have fixed it:

    The manpage for ssh_config describes these parameters and how they interact.

    YMMV!