maquinadigital

Well-Known Member
Aug 10, 2006
70
7
158
cPanel Access Level
DataCenter Provider
Greetings,

I've tried to change the port on sshd server and now I can't access the server by ssh.

I still have root password and WHM / Cpanel access as root, as well as FTP, etc.


Do anybody has any clue as how I could restore the default sshd_config file or something, using whm or any of the things I still have access to?

The server is about 300 miles from my office and on-hands services are expensive.

Best regards and thanks in advance.
 

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
Greetings,

I've tried to change the port on sshd server and now I can't access the server by ssh.

I still have root password and WHM / Cpanel access as root, as well as FTP, etc.


Do anybody has any clue as how I could restore the default sshd_config file or something, using whm or any of the things I still have access to?

The server is about 300 miles from my office and on-hands services are expensive.

Best regards and thanks in advance.
Try resetting SSH via WHM using this.

http://yourdomain.com:2086/scripts2/doautofixer?autofix=safesshrestart

Make sure, the port you are setting for SSH is opened in the server firewall before resetting SSH port.
 

PlatinumServerM

Well-Known Member
PartnerNOC
Jul 10, 2005
400
3
168
New Jersey, USA
cPanel Access Level
Root Administrator
If you changed the ssh port and you got locked out, most likely there's a firewall blocking that port. If you have kvm access you can just stop the firewall and see if that helps.
 

maquinadigital

Well-Known Member
Aug 10, 2006
70
7
158
cPanel Access Level
DataCenter Provider
  • Like
Reactions: rodrocolodro

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
7
68
PK
cPanel Access Level
DataCenter Provider
Thanks! It worked!
The port was open but I forget to check if there was another service running on it and... it was.

Regained access to the server, reconfigured another port, and it's working fine.

Live safer, thank you very much.
Glad your issue was solved. :)