Change SSH port in CWP CentOS 7

To modify the SSH port on CentOs Web Panel:

  1. Login to CWP at https://domainname.com:2087 (port 2087 is for a secure connection)
  2. Go to Services Config->SSH Configuration
  3. This will open for editing the file /etc/ssh/sshd_config
  4. Look for the line:#Port 22 and change the port number to something else, like 2211; also remove the # character from the beginning of the line. In the end, you will have:Port 2211
  5. Click the Save changes button
  6. Go to the Dashboard and restart the SSH server.
  7. Go to Security->CSF Firewall, click the Firewall Configuration button
  8. Look for the # Allow incoming TCP ports section and add your port number to the list.
  9. Click the Save changes button
  10. Go to Security->CSF Firewall, click the Firewall Restart button
  11. Reboot CWP.
  12. Now you will be able to connect to the server via SSH using the new port number

Sebagai Dokumentasi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s