Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to SSH into a linux machine running ubuntu, but the interactive shell stuck somewhere and I can't key in anything. I am on Mac OS X Lion. This only happens when I am trying to access via an external IP. Local LAN SSH is working perfectly.

macbook:~ user$ ssh -v -v user@serverip
// i skipped the rest of the log, but I can paste it here again if needed.

Authenticated to serverip
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8
debug2: channel 0: request env confirm 0
debug2: channel 0: request shell confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768

My terminal shell just hang after this, and I can't key in anything. I checked var/log/auth on the server and saw that the a session is being created and I had already logged in, but I don't see any responses on my client machine.

I googled around and a lot of the solution had to do with the Broadcom wireless driver, but I am not even using one, so I am pretty clueless here.

To give you more information, the linux machine is also running a web server, and I have no problem accessing the web server.

Thanks. Any help is appreciated.

share|improve this question
Have you been able to ssh to this machine in the past? Are you able to connect to this machine via http or other protocols? Are you able to connect via ssh from a different client? – Doug Harris Apr 30 '12 at 17:33
I was able to ssh to this machine, and I am able to connect to this machine via http. Tried with another Window machine, can't work as well. – revolver May 1 '12 at 1:40
Is your local network behind a router? If so, to access a local machine from an external IP, you'll need to setup a port forward for port 22 on the router to port 22 on your internal SSH host. – John Watson May 31 '12 at 0:36
@JohnWatson. Port forwarding done. But still can't connect – revolver May 31 '12 at 2:05


Some things to try:

  1. Move the web server off the port that works (I'm guessing Apache..?).

  2. Then make the SSH server listen to the working port that you used for your webserver. (you may need restart each respective daemon.

  3. report results.

(I'm trying to rule out the possibility that your ISP is blocking the connection..)

Cheers :)

share|improve this answer

Try using a "ProxyCommand nc %h %p" in ~/.ssh/config


I have been experiencing a similar problem ever since I updated to Mac OS X Mountain Lion. However, a combination of Mac OS X (stock ssh client) and Asus Router and external server (over WAN) causes login to timeout, for me.

If I try to connect using my Mobile hot-spot (skip Asus Router) to same host, connection works fine and I am able to use interactive terminal.

If I try to connect using Asus Router to local server Local (LAN), it works.

If I use Forklift (SFTP/SCP)/Chrome SSH Client/putty, Asus Router and external server, it works.

But stock ssh, Asus Router and external server, doesn't work. But, this is my normal setup and has to "just work".

There is a long thread on apple forum about this - Broken SSH client on Mavericks

After reading this thread, I used above command in ssh config, and I am able to work with my "normal setup".

share|improve this answer
Can you explain your answer? It helps to give some background explanation when answering a question. – suspectus Apr 10 '15 at 15:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.