4

I'm running Ubuntu 11.04.

Sometimes my computer stops seeing the names of the other computers on my network.

So I can no longer log into another computer by typing the hosting name

e.g. ssh me@secondcomputer.local

I can still log in using the local network IP address.

How can I get the first way to work again without rebooting? I know this problem is local to the computer.

The other computers on my network can still see one another. But they can no longer see the computer I'm working on, not even by local ip address.

0
3

OK I found the answer:

sudo service avahi-daemon restart
1
  • was just at writing an answer. +1 for posting your solition :) – Takkat Jun 29 '11 at 14:44
0

You may have a problem with Avahi not reconnecting to the service once it disappeared (see also bug #586229). This can happen when services disconnect without sending a proper signal (e.g. after WiFi problems). There is a timeout to avoid this but this seems not always to be working.

To avoid problems with Avahi you may setup your local network including ssh by using a fixed IP address rather than the .local address resolution from Avahi.

You can also add your known host in ~/.ssh/config to ease connections:

Host <hostname>
    HostName <IP>
    Port <Portnumber>
    User MyName

and connect by

ssh <hostname>
1
  • Thanks for the suggestion. But isn't hard coding a IP to hostname mapping inconvenient when you have DHCP IP assignments? – dan Jun 29 '11 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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