How to Change SSH Port with WHM & CSF

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

    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 🙂

1 reply on “How to Change SSH Port with WHM & CSF”

Leave a Reply

Your email address will not be published. Required fields are marked *