I setup a Ubuntu instance and I am trying to access from a windows system it via SSH with PuTTy. I can SSH with the IP address but I am unable to do so with the hostname.
I checked the /etc/hosts file on the Ubuntu server and it has the IP address and the hostname -
127.0.0.1 localhost 172.xx.xx.xx7 riz-7.xxxxxxxx.NET riz-7 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
When I try to SSH with the hostname I get this error-
Unable to to open connection to riz-7. Host does not exist
What can be the reason? I was able to SSH with hostname earlier but not anymore.