OpenSSH hangs after login without showing login prompt

5,126

Okay, this on turned out to be WTF LOL squared...

I got a hint that it was most likely ICMP packets being filtered by the firewall. So when you stumble upon this issue check it out.

In the article I found on Hacker News one reads:

ssh did not work. It would connect, flip some data back and forth (as shown with -v) and then would hang.

Certain websites would become inaccessible.

Which were my symptomps that appeared after switching my wireless router to another device. Device in question was Linksys WRT-54G running dd-wrt.

Share:
5,126

Related videos on Youtube

Maciej Jankowski
Author by

Maciej Jankowski

I have always been a fan of client-side, quirky JavaScript.

Updated on September 18, 2022

Comments

  • Maciej Jankowski
    Maciej Jankowski over 1 year

    I ran across an issue with ssh after fresh Ubuntu 13.10 installation on Lenovo T420. I tried git pull (which failed) and this led me to more general ssh failing.

    After spending some 2-3 hrs of beautiful Sunday morning I have established:

    1. ssh is able to authenticate. see the log below. Also telnet google.com 80 hangs on connecting.
    2. I can connect using putty - it shows motd and prompt
    3. It doesn't work on both wired and wireless connections, also I tried cellular network.
    4. I can successfully login to localhost

    here be the log:

    debug1: Authentication succeeded (keyboard-interactive).
    Authenticated to web1.mydevil.net (via proxy).
    debug1: channel 0: new [client-session]
    debug1: Requesting [email protected]
    debug1: Entering interactive session.
    debug1: Sending environment.
    debug1: Sending env LC_PAPER = pl_PL.UTF-8
    

    and then just keeps sending

    debug1: client_input_channel_req: channel 0 rtype [email protected] reply 1
    

    without showing me the prompt and eventually disconnects.

    I found out that telnet google.com 80 hangs on Connecting <IP-addr>... as well.

    • Martin von Wittich
      Martin von Wittich over 10 years
      Have you checked /var/log/auth.log on the server for possible error messages?
    • Maciej Jankowski
      Maciej Jankowski over 10 years
      Permission denied. as expected. this is not my machine.
    • Martin von Wittich
      Martin von Wittich over 10 years
      Hmm... is it possible that the server is somehow misconfigured? I'm not really sure how to debug this further. You could check the output of ssh -vvv if there's anything more interesting in the debug messages, but the client side log was rarely helpful for me when debugging issues like these.
  • user2948306
    user2948306 about 8 years
    "Filter all ICMP and watch the world burn", indeed. I take it DD-WRT was the failing device, right?
  • Maciej Jankowski
    Maciej Jankowski about 8 years
    yup, that seemed to be the problem. Maybe I messed something with its configuration. It worked on another device running dd-wrt.