ssh with short name not resolving host name but nslookup works
Issue
- We are trying to ssh to a host but we are getting error "ssh: Could not resolve hostname host202d: Name or service not known" but nslookup works.
[user@client001 ~]$ ssh -vvv host202d
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 49: Applying options for *
debug2: resolving "host202d" port 22
ssh: Could not resolve hostname host202d: Name or service not known
ping also fails.
[user@client001 ~]$ ping -c3 host202d
ping: host202d: Name or service not known
But nslookup works.
[user@client001 ~]$ nslookup host202d
Server: 10.73.2.107
Address: 10.73.2.107#53
Name: host202d.redhat.com
Address: 10.4.204.55
Environment
- Red Hat Enterprise Linux 7.7
- bind-utils-9.11.4-9.P2.el7.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.