Mengganti Port SSH

  • Log on to the server as an administrator.
  • Open the SSH configuration file sshd_config with the text editor vi:
    vi /etc/ssh/sshd_config
  • Search for the entry Port 22.
  • Replace port 22 with a port between 1024 and 65536
  • Save the file.
  • Restart the service.

    Ubuntu

    service ssh restart
    CentOS 7

    systemctl restart sshd

Leave a Reply