Tech post: Ubuntu 10.04 hangs on ssh or telnet login (fix)

I thought I’d post this just in case anyone else has the same problem I did with 10.04 hanging on ssh login (it also hangs on telnet login, but control-C will fix that. SSH users are not so lucky)

The problem would seem to be that /usr/lib/update-notifier/update-motd-updates-available is trying to access the network and failing – or just taking a very long time to succeed. I seem to especially have problems with this on nodes running on Amazon’s EC2 network.

The easy solution is to edit /usr/lib/update-notifier/update-motd-updates-available and add a ‘exit’ at the top of the script. Of course, this disables checking for updates whenever you log in, but personally I’d rather be *able* to log in. 😉

You will also need to edit /etc/update-motd.d/90-updates-available and similarly add ‘exit’ to it, so that the next time these files are generated this fix continues to work

2 Responses to “Tech post: Ubuntu 10.04 hangs on ssh or telnet login (fix)”

  1. Paul Says:

    Make sure your hosts file is correct.

  2. sheer_panic Says:

    There should be pretty much nothing you can do to a server short of abject stupidity that renders it impossible to log in. These were the stock EC2 images, running on EC2!

Leave a Reply