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
    /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 ????
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

A-Z Index of the Linux BASH command line

An A-Z Index of the Linux BASH command line alias Create an aliasapropos Search Help manual...

Changing The SSH Port

While there are many ways to make sure your server is as secure as possible there are some basic...

Check and open ports in CentOS / Fedora / Redhat

  If you want to open or close a port for a Linux firewall you have to edit the rules in...

Clear Memory Cache on Linux Server

By default the Linux OS has a very efficient memory management process that should be freeing any...

Create email accounts using ssh

/scripts/addpop user_id@yourdomains.com user_password Do below mentioned steps for configuration...