Specifying the SSH service port

The default port of SSH service is 22. Perform this task to specify another port for the SSH service.

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.

To specify the SSH service port:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Specify a port for the SSH service.

ssh server port port-number

By default, the SSH port is 22.