Can Ssh Using Domain Name but Can't 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...
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
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.