ssh port number

Issues related to configuring your network
Post Reply
Posts: 50
Joined: 2016/02/24 19:11:41

ssh port number

Post by nmrdukeman » 2020/08/17 16:10:27

I have a simple question about ssh port numbers. I have one local data server (Centos 8) and bunch of local clients (Centos 7). The first thing that we do is to use "rsync" to fetch all the data from the clients to the data server. Secondly, people can use "sftp" remotely to download the data from the local server.

The question is : Do all these computers, local and remote, need to use the same tcp port number for ssh/rsync/sftp?

Thanks for your help in advance.


User avatar
Posts: 3192
Joined: 2007/12/11 08:17:33
Location: Finland

Re: ssh port number

Post by jlehtone » 2020/08/17 16:27:58

rsync does by default use ssh (or rsync) as transfer protocol, i.e. will contact sshd (or rsync daemon) in the remote machine. sftp does contact sshd. We can thus conclude that all three (ssh/sftp/rsync) talk to sshd.

The sshd does listen one port by default, but can be configured to listen to multiple ports and/or different port than default.

Client process does not listen to any port. The connection reserves a random port.

Yes, sshd in each machine can use different port. The inconvenience is that you need to communicate the ports to users (whom you allow to connect) and you need to customize the machines.

Do you think that is worth the effort?

Post Reply

Return to “CentOS 8 - Networking Support”