Re: ssh on ping port?



James J. Dines wrote:
Snowbat wrote:

On Sun, 15 Jan 2006 17:01:54 -0600, Beowulf wrote:

Is there any reason why ssh and its daemon sshd could not be run on the
port normally used for ping?

Yes - ping doesn't use a port.

http://en.wikipedia.org/wiki/ICMP

Ping absolutely *does* use a port. Ping is a program which sends ICMP ECHO REQUEST and receives ICMP ECHO REPLY. On my Mandriva Linux 2006 box, /etc/services shows that port 7 is used.

type (in a terminal, of course):
cat /etc/services | grep echo
... to verify this.

tcp/udp port 7, the echo service, is NOT the same as an icmp echo request/reply used by the ping program. Please do not confuse an icmp (control) packet with a tcp and/or udp packet. The icmp protocol do NOT use the notation of ports, instead the icmp protocol is divided into different types where echo request is type 8 and echo reply is type 0.


For those who look into this on the wiki page, do not confuse port number
with ICMP message #.  The ICMP Type field for an echo request is 8, while
for echo reply, it is 0.  Both will use port 7 if that is
what /etc/services says to use.

Sorry, but this is not correct. Please see above.

.



Relevant Pages