Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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>
share|improve this answer
    
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
up vote 3 down vote accepted

OK I found the answer:

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

Your Answer

 
discard

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.