Can't resolve server by fqdn when search domain is enabled

by Andrew   Last Updated August 22, 2017 14:00 PM

I have a server named site.dpt.myorg.local, which i want to access both with short name and with fqdn. When i try to use short site or site.dpt form, everything works just fine. However when i use fqdn - lookup works when using dig or nslookup, but fails when i use web browser, ssh and other tools.

I.e. ssh and ping fail with following error:

$ ssh -vvvv site.dpt.myorg.local
OpenSSH_7.2p2, OpenSSL 1.0.2j-fips  26 Sep 2016
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 25: Applying options for *
debug2: resolving "site.dpt.myorg.local" port 22
ssh: Could not resolve hostname site.dpt.myorg.local: Name or service not known

$ ping site.dpt.myorg.local
ping: unknown host site.dpt.myorg.local

I have a following resolv.conf file:

search myorg.local dpt.myorg.local

My OS is Opensuse 42.3

Can anyone point me to the cause of this problem? Thanks!

Related Questions

Linux DNS resolve rotate attempts does not take effect

Updated November 19, 2018 10:00 AM

Not possible to update resolv.conf

Updated May 17, 2018 06:00 AM

Linux DNS query sequence with resolv.conf

Updated November 18, 2018 08:00 AM