I am a new user to OS X (MacBook Air, 10.6.7) migrating from Ubuntu and extremely happy with it. I use terminator running on X11 for my terminal program, and I'm using SSH: OpenSSH_5.8p1, OpenSSL 1.0.0d 8 Feb 2011

My problem is that when tunnelblick VPNs reconnect all my SSH sessions hang and I must close the terminal and re-open it. In Ubuntu what would happen is the sessions would automatically continue working again once the VPN connection was re-established.

Is there any way to make it so these connections re-establish once the VPN is back up? Occasionally my VPN hiccups and its annoying to close all my windows. I'm aware I could use screen but it doesn't really solve the problem as easily as it was working under Ubuntu.

  • 3
    probably you're being assigned a new ip address, that's why the ssh connections freeze.. :/
    – nuc
    Commented Apr 13, 2011 at 15:33
  • Ah, I've suffered from the exact same feature and thought it was a bug in Transmit (which froze when I prematurely shut down VPN-connection while using SFTP, which required the VPN). Even reported it, as shutting the VPN didn't affect other connections and I thought reconnecting should help in the same manner as in Ubuntu. Commented Apr 13, 2011 at 16:04

1 Answer 1


Unfortunately, I think each VPN client will be picky about this in its own way. Since the network is dropping from underneath the SSH connection, you will have three scenarios that could cause it to "hang", or just drop (that I can think of).

  1. Data is flowing back and forth, and the connection is gone.
  2. You get a new IP address when reconnecting.
  3. Timeout/Alive conditions trigger before you reconnect.

2 Suggestions...

  1. Use screen (you said you don't want to do this, I know, but it really is the most robust solution. There are scripts out there that can greatly enhance/automate the reconnection process).
  2. Compare your SSH configurations. Usually stored in /etc/ssh_config or similiar.

BTW -- I don't think you should need to close windows, just do return~. (return tilde dot). Tilde is used to control the ssh session. See the manpage for more details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .