Telnet returns Name or service not known
16,257
On a RHEL7 system, typing telnet 192.168.1.100:1521 results in exactly your error message:
telnet: 192.168.1.100:1521: Name or service not known
192.168.1.100:1521: Unknown host
... so it seems likely to me that there was an accidental copy/paste of the command with a colon instead of a space:
telnet 192.168.1.100 1521
Tested with:
rpm -qf $(type -p telnet)
telnet-0.17-64.el7.x86_64
Related videos on Youtube
Author by
Ali Golestan
Experienced Linux System Administrator with a demonstrated history of working in the information technology and services industry
Updated on September 18, 2022Comments
-
Ali Golestan 3 months
I'm trying to telnet from Centos 7 to Centos 6.8 on port 1521:
#telnet 192.168.1.100 1521And I get the following error
telnet: 192.168.1.100:1521: Name or service not known 192.168.1.100:1521: Unknown hostFirewall is disable on both machines. Selinux is disabled on both machines. Ping is working fine on both machines.
-
Bodo almost 4 yearsAre you sure you typedtelnet 192.168.1.100 1521(correct)? Or did you typetelnet 192.168.1.100:1521(wrong)? -
Ali Golestan almost 4 yearsas you see in the question i typed
telnet 192.168.1.100 1521 -
Bodo almost 4 yearsI asked because I get a similar error message when I use a colon:between IP address and port number instead of whitespace. Your error message means thattelnetwas not able to resolve a host name192.168.1.100:1521which apparently is the combination of an IP address and a port number. If you really separated IP address and port number with space: Do you have an alias or function namedtelnet? -
Philip Couling almost 4 yearsOn Debian telnet separates host and port in an error message with a/eg:telnet: could not resolve example.com/1521: Name or service not known. So if you really did calltelnet 192.168.1.100 1521then what version of telnet are you using and on what operating system. -
Арсений Черенков almost 4 years1) I see no reason to DV, 2) I don't have centos available, but in redhat that looks like correct syntax. 3) what is the result of
whereis telnetandalias telnet?
-