how to reset ssh port from whm

Discussions related with hosting control panels used, which include cPanel, Plesk, Directadmin etc..
Post Reply
Ashlin
Posts: 0
Joined: Fri Sep 16, 2016 10:10 am

how to reset ssh port from whm

Post by Ashlin »

Hi,

I have locked myself out of a cPanel server due to a mistaken change in SSHD config file. Is there a way to get default config file back without SSH access?



shaan
Posts: 0
Joined: Sat Apr 14, 2018 4:21 pm

Re: how to reset ssh port from whm

Post by shaan »

Hi Ashlin,

If you have WHM access as root user, then you can use cPanel Auto fixer script to reset the SSH port.

> Log into WHM as the root user.

> Access the following URL to your SSH configuration settings to default:

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

Replace “serverip” with your server’s IP address or hostname, whatever you are using to access the WHM panel.

Once the above script is executed, the port number of your SSH server will be reset to its default value 22.

If port 22 is already in use for any other service then, another port will be opened for SSH and it will be displayed in the screen where you are executing the script.


Shaan N
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree



Post Reply