Modify the default ssh port at 16.04

  1. Open / etc / SSH / the ssh_config , in Port adding a new port is provided under the command:
Port 8888
That allows ssh access through port 8888.
  1. Open / etc / SSH / the sshd_config , have the same configuration.
  2. Restart the ssh service:

 

sudo /etc/init.d/ssh restart

 

or
sudo service ssh restart
  1. 8888 open ports in the firewall.
  2. Ssh port be connected by 8888, after a successful connection. By steps 1 and 2 of document annotation Port 22 , 22 to close the port.

Guess you like

Origin www.cnblogs.com/fxyy/p/11082484.html