ssh server port

Use ssh server port to specify the SSH service port.

Use undo ssh server port to restore the default.


ssh server port port-number

undo ssh server port


The SSH service port is 22.


System view

Predefined user roles




port-number: Specifies a port number in the range of 1 to 65535.

Usage guidelines

If you modify the SSH port number when the SSH server is enabled, the SSH service is restarted and all SSH connections are terminated after the modification. SSH users must reconnect to the SSH server to access the server.

If you set the SSH port to a well-known port number, the service that uses the well-known port number might fail to start. Well-known port numbers are in the range of 1 to 1024.


# Set the SSH service port to 1025.

<Sysname> system-view
[Sysname] ssh server port 1025