Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

On a fresh Ubuntu 12.04 installation, we noticed that we were having issues with openssh as it was constantly breaking the connection randomly after a period of time. After doing some debugging, we found that we were able to consistently replicate the issue as follows:

ping #works
sudo apt-get clean #no issues
sudo apt-get update #stays at 0%, must ^C to exit
ping #no longer connects

The only method that can be used to restore DNS access is to reboot the machine.

Additional info: We have replaced the resolve.conf symlink with an actual file to specify google's nameserver (which I have personally done before in 12.04 in our network without issues). The machine is in a static network without DHCP and is issued a static IP address. There are no issues pinging the machine from elsewhere in the network, but when openssh was installed the ssh connection would be refused.

Anyone have any suggestions on how to resolve this?

share|improve this question
12.04 generates resolv.conf using info in /etc/network/interfaces (hence the "DO NOT EDIT BY HAND" message). Have you added dns-nameservers to your static entry? – charlesbridge Aug 15 '12 at 18:44
Yes, we have that entry. – geoffreak Aug 15 '12 at 18:53
nslookup should lookup using as the dns server. nslookup should lookup using whatever the program things your default dns server is (it will show it at the top of the result) – ijk Aug 15 '12 at 20:10
up vote 2 down vote accepted

It turns out the issue was related to IPv6. Somehow during install Ubuntu defaulted to IPv6 (which our network doesn't support), causing it to lose connection.

Reinstalling Ubuntu without being connected to the network resolved the issue, but I'm sure there would be an easier way to do it.

EDIT: The issue came back awhile later but we were finally able to deduce that there was another machine with the same IP address in the network. Changing the IP address resolved the issue.

share|improve this answer
As more than 2 days have passed, you can now accept this self-answer. Doing so will clarify how you fixed this, and that you are no longer looking for help. – Eliah Kagan Sep 4 '12 at 0:26

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.