Current location - Quotes Website - Collection of slogans - How to modify the default port number of SSH for linux
How to modify the default port number of SSH for linux
The port number of ssh in Linux system can be modified in its service configuration file.

1. The default configuration file path is /etc/ssh/sshd_config. The red position in the figure below is the default port 22.

2. Open this file with vi/vim editor, and then modify 22 to other unoccupied ports.

3. Execute wq in vi/vim! , save and exit, and then restart the ssh service. (The picture below shows the restart of ssh service in ubuntu, and the sudo privilege is enhanced).