Recently I installed Ubuntu server 12.04 on my computer at home with ssh support. I'm using WiFi instead of cable connection for this server. Everything works fine except the fact that for some unknown reason when I try to access it during the day from my work ssh won't work. When I'm home, it works. I did notice that sometimes I have to 'try' to connect to the server locally once to make ssh work (I'm using Putty for connection).

Steps I did to diagnose it: 1. Disabled power management for WiFi device 2. Disabled dns for sshd 3. Tried to 'ping' my server from my home NAS (no ping replies. I had to connect to my NAS remotely for this ping from my work. Therefore ssh ports are open) 4. When at home I tried to access my server from outside (from a server on Amazon) and it worked. 5. Checked logs but couldn't find anything related

I do have UFW enabled and port 22 open on the server.

I feel that this issue could be related to some kind of power management that put my wifi to sleep therefore ssh not accessible, but I don't know where to look for power settings.

Almost forgot to mention that yesterday when I came home from work I tried to connect locally to this server and it wasn't successful. Then I logged in to the server and checked if ssh service was running and it was. Then I tried to ping some server and only after that I was able to connect via ssh to this server.

Any advice or help would be really appreciated...

Edit#1: I have a D-Link 655 wireless router and my WiFi card is Asus USB-N13 (stock drivers)

Edit#2: I tried to ping Google from the server (physically connected) today and was unable to for about 2-3 minutes. Then, suddenly, server became responsive and available. iwconfig showed that I was always connected to the network.

  • Do you have suitable routing (or port mapping) to connect to this server from the Internet? (Has it ever worked?) What is the WiFi router, and WiFi device (on the server)? (Add more detail.) – david6 Mar 23 '13 at 2:45
  • @david6: I do and it works when ssh/server is accessible. I put more information to my question – Timka Mar 23 '13 at 3:04

Eventually I was able to resolve this issue.

The problem was with my DNS settings on my router. I had to disable DNS Relay on a router and manually configure DNS records. Then I forced my Ubuntu box to renew DHCP settings with the proper DNS records in place.

Its been 2 days now without any connectivity issues.

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.