How to Change SSH Port with WHM & CSF Print

  • ssh, port, ssh port change, csf, firewall
  • 0

If you are using WHM & CSF, under CentOS, you may follow this steps to change SSH port from 22 (default) to something else ????

  1. First, edit this file
    /etc/ssh/sshd_config

    You can use vi

    vi /etc/ssh/sshd_config
  2. Find this line
    #Port 22

    Change to your chosen port, and remove the comment ( # sign )

    Port 9999
  3. Restart the SSH service.
    service sshd reload
  4. Now we must allow incoming data in the new port. Open your WHM >> Plugins >> CSF.
  5. Click “Firewall Configuration” button.
  6. Add your new port in “TCP_IN” and “TCP_OUT”.
  7. Click “Change” button in the bottom of the page.
  8. You will be asked to restart CSF & LFD. Do it.
  9. It’s done ????

Was this answer helpful?

« Back