"nc -v somehost.example.com 22" returns "nc: getaddrinfo: Name or service not known"
I have this issue: "nc -v <ip-address> 22" works fine, but "nc -v <fqdn> 22" fails with error message "nc: getaddrinfo: Name or service not known". However, "host <fqdn>" works fine, so name resolution works. So I have a working name resolution, but nc (netcat) doesn't seems to be using it or something. Same kind of issue with "ping <fqdn>".
Does anyone know how come name resolution works, but utilities such as nc and ping doesn't?