Pay attention, people with years of experience overlook this.I apologise to Windows users presumably using PuTTY.
On Linux systems (clients), SSH resolves the host "name" in this order...
(Ubuntu naming shown as an example)
- Entries in ~/.ssh/config
- Entries in /etc/ssh/ssh_config
- Entries in /etc/hosts...etc.
This resolution is local and "nslookup" does not see these. You need to look yourself if strange results are occurring. Your router may cache DNS lookups as well. This will be an issue if your host is a laptop and frequently changes IP addresses.