Changing the SSH port

by John Heaton


In order to secure your SSH server it is a good idea to change the SSH port. The default port is 22, but Aspera recommends changing it to the product standard of 33001. The instructions will differ slightly between each operating system, but in general the steps are as follows.


Operating System: Linux, Windows


1. Open the sshd_config file in a text editor, like vi or Wordpad. Example locations for this file:

  • Linux: /etc/ssh/sshd_config
  • Windows (32 bit): C:\Program Files\Aspera\Enterprise Server\etc\sshd_config
  • Windows (64 bit): C:\Program Files (x86)\Aspera\Enterprise Server\etc\sshd_config

2. Locate the port definition, which should be commented out. It will look like this:

#Port 22

Edit the line so it is no longer commented out, and replace the port number with the desired port:

Port 33001


3. Restart the SSH service.

On a Linux system the service can be restarted from the associated init script:

sudo service sshd restart

sudo /etc/init.d/ssh restart


In Windows use the instructions from this article (Resarting ssh on Windows).

4. Any applications that knows about the SSH port will need to be reconfigured. In the aspera.conf file the SSH port is defined as a property in the <WEB> tag, which is used by HTTP fallback and the default dirlist script for the Connect Server. Here is an example of what this portion of the might look like:

<WEB SshPort = "33001" 
UdpPort = "33001"
PathMTU = "0"
HttpsFallbackPort="8443" />
Powered by Zendesk