cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
21744
Views
0
Helpful
3
Replies

Are we telnet-ing to tcp port 22, or udp port 22?

stromel.cisco
Level 1
Level 1

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

3 Replies 3

Timothy Stewart
Cisco Employee
Cisco Employee

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

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

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