"nc: getaddrinfo: nodename nor servname provided, or not known" with shell script

11,526

Check this out:

nc: getaddrinfo: nodename nor servname provided

This error means netcat was unable to look up the requested host in DNS. Usually this means you either have a typo somewhere, or your the pagekite.py connector on the SSH server side is not running properly.

Try to check your packages, something is either wrong with your script or the DNS request.

Hope it helps! :)

Source: http://pagekite.net/wiki/Howto/SshOverPageKite/#ncdns

Share:
11,526

Related videos on Youtube

M. Ott
Author by

M. Ott

Updated on September 26, 2022

Comments

  • M. Ott
    M. Ott over 1 year

    I'm trying to communicate with my server and send telnet commands (login and logout again). For this I generated a shell skript and getting the error message "nc: getaddrinfo: nodename nor servname provided, or not known".

    The specific line is:

    (sleep 1&echo $login&sleep 1&echo $password&sleep 1&echo exit) | nc $IP 23 > dump.out
    

    When I execute this line (and for sure the export lines before) directly in the terminal it works without any problem, but when I execute the script, I get the error message.

    Can anyone help? Any help would be appreciated. Thanks in advance.

    • Artemix
      Artemix
      This looks like a question for ServerFault.com