How to reset default SSH port on cPanel servers


How to reset default SSH port on cPanel servers


How to change/reset default SSH port on your cPanel servers?

Did you forget SSH port and try to reset it via WHM, Use the following  SSH configuration settings on WHM.

Login to your WHM on a non secure port that is : 2086
For example : http://serverip:2086

Then browse the URL to reset the SSH configuration settings :

http://serverip:2086/scripts2/doautofixer?autofix=safesshrestart

After running the script, the default port 22 will reset on your cpanel SSH configuration. You can login SSH and reset it.

 

How to change the SSH port on cPanel Servers?

To change the SSH port on cPanel server.  Login via root password and edit the following file.

vi /etc/ssh/sshd_config

Find the line that says Port 22 and change 22 to any number between 1024->65535  and save the file.

Once done, run:

/etc/init.d/sshd restart

Don’t forget to Enable SSH port on your server Firewall (CSF,etc.,). Otherwise you won’t connect SSH 

Add the new ssh port on csf firewall settings..

vi /etc/csf/csf.conf

TCP_IN =

TCP_OUT =

Use this knowledgebase to Disable public key authentication in SSH.
Bu cevap yeterince yardımcı oldu mu?

Diğer Dökümanlar


  • What is cPanel and how to access it?

    CPanel is a fully featured web-based control panel that allows you to manage your domain through a web interface. cPanel gives you complete control over a vast amount of functions, streamlining...

  • CloudFlare Plugin install on cpanel

    CloudFlare is a performance and security service. With 14 points of presence around the world, a website on CloudFlare typically loads twice as fast, uses 65% less server resources, saves 60% of...

  • Enable Cronjob in cpanel and examples

    What is cron? It is the scheduling daemon of the Linux operating system Cron jobs allow you to automate repetitive tasks on the server that hosts your web site. This is a powerful tool that allows...

  • What is Anonymous FTP and how to enable it

    Anonymous FTP allows you and others that you give permission to, to access your “public_ftp” folder. There are two options available: 1. ftp://ftp.yourdomain.com –This allows...

  • Unable to connect cpanel using IP/whm and IP/cpanel

    If cpanel cannot be accessed using IP/whm and IP/cpanel, but can be accessed using IP:2086 and IP:2082, then here goes the solution for the same. The reason for this issue due to missing some...