ssh on port 21?

Mark Knecht markknecht at comcast.net
Wed Feb 25 13:10:42 UTC 2004


On Tue, 2004-02-24 at 21:32, rab wrote:

> I see that there is a "p" switch for a port number. So are you saying I 
> can ssh out port 23 (or whatever port is used on the network at work for 
> telnet) and this will connect up with the sshd daemon through port 22 on 
> my pc?
> 
> Rick
> 

No, I doubt that would work. Port numbers would have to match on both
ends. If an sshd daemon was running on the remote end on port 23 and you
told shh on your end to connect on port 23, then I think it would do
what you are asking it to do.

I'm pretty sure there has to be agreement on both ends as to what
protocol happens on what port number. This is typically in /etc/services
on both computers. If there services files didn't match everywhere none
of this would work. By giving the daemon and the client both
instructions to use the same non-standard ports I believe you can run
most protocols on any port you want, but I've never bothered to try any.

Be forewarned that if you have firewalls in the path then you are going
to be subject to how the firewall does port forwarding. Just because you
choose port 23  on your PC doesn't mean the firewall will forward all
port 23 traffic to your PC. It will have tables that say where this
traffic is supposed to go, so that could cause problems also.

- Mark





More information about the Redhat-install-list mailing list