Something very strange happened to my server.

From home (where my server is also) I used to ssh using my server name. From outside I ssh using my domain name, which obviously points to my home server. However since today, I cant ssh into my server using my server name from home.

I cant think why that is, I havent done any changes. Any body knows what could cause this issue?

I am using mobaxterm to ssh if that helps. I also use pub/priv ssh key.


I am trying to ssh using my server name, very rarely it works, but most of the time it says "host does not exist"


  • Have you tried using just the IP address? If it works with the IP, then it's your name resolution that is not working anymore. If it doesn't work with the IP, then there is something up with your server setup.
    – G Trawo
    Commented Apr 28, 2019 at 1:16
  • @G Trawo its working now, I have no idea whats happening, I think might be the router that is not recognising both device is local or maybe the router is just being too slow and its timing out before it bounces back any information
    – LukeDS
    Commented Apr 28, 2019 at 1:32
  • I would look at what @Comar suggested, with a possible IP conflict. Is it a static assigned address? An IP conflict can cause intermittent issues like that.
    – G Trawo
    Commented Apr 28, 2019 at 1:36
  • Does your /etc/nsswitch.conf have a line like: hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname If not, add the libnss-resolve package to add the resolve section.
    – ubfan1
    Commented Apr 28, 2019 at 3:20
  • @ubfan1 Considering that he is using mobaxterm, which is a Windows program, I would assume that he won’t have nsswitch.conf. And it works sometimes. These intermittent problems can difficult to diagnose.
    – G Trawo
    Commented Apr 28, 2019 at 11:47

1 Answer 1


Looks like it's DNS related issue or a network problem.

Make sure that your domain name resolves properly into your server's IP.

host domain


nslookup domain

When it comes to network issues use mtr for packet losses or other network problems:

mtr domain

This might be also caused by fail2ban, if you have it installed on your server of course.

In rare cases, there might be IP addresses conflict, meaning that another device in your LAN or WAN binds to your server's IP.

Use dmesg to find out if your NIC is f.e. reseting

sudo dmesg | grep NIC

Also make sure that your server's IP is static. Most of ISP's provides you with dynamic IP. In that case you should consider a DDNS service.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .