10-15-2010 05:11 AM - edited 03-03-2019 06:05 AM
When we do "telnet x.x.x.x 22", are we telnet-ing to tcp port 22, or udp port 22? Because SSH port 22 is both tcp and udp.
Thanks
Stro
10-15-2010 05:14 AM
Telnet uses TCP as the transport layer, therefore you are trying to go to TCP port 22. You will need a telnet server listening on that port for it to work.
Tim
10-15-2010 04:56 PM
Thanks Tim.
So if we want to telnet to udp port (not sure whether we ever need to), what do we do? udp is in transport layer as well.
Thanks
Stro
10-16-2010 05:03 AM
Stro,
The telnet server/deamon will only listen to TCP port 23. A telnet client will only use TCP as the transport protocol. I guess you could write your own telnet client (or use netcat) to use UDP but on a Cisco router the telnet process will not respond unless the connection request comes in on TCP port 23. A quick search on the web reveals this question is asked alot, for what reason I am unsure. Here's a wiki article:
http://wiki.answers.com/Q/Why_should_telnet_to_UDP_ports_fail
Hope this helps,
Tim
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide