Can ssh using domain name but cant using server name!

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.

Update:

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

Thanks

7

1 Answer

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

or

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like