Can't connect ssh after server compromised

KanyonBT

Registered
Nov 27, 2017
2
0
1
turkey
cPanel Access Level
Root Administrator
Hello,
Firstly my english is weak, I apologize already for this.

my problem doesn't work ssh. 1 day ago no problem but now ftp and putty with cant connected ssh.

50 sites on the server were damaged and attacked.

Is it possible to re-install ssh or reset its settings?

I say again whm I can connect with root
but I can not connect to ssh with the same username and password.
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
465
113
UK
cPanel Access Level
Root Administrator
Hello,
If you are unable to log into SSH but WHM is accessible, there is a script that will provide a minimal, default configuration of SSH to allow you to log in again. To use this script, you append the following to the url for WHM:

Code:
/scripts2/doautofixer?autofix=safesshrestart
For example, if your server's address is 1.2.3.4, this url will provide a temporary ssh instance that will allow login:

Code:
https://1.2.3.4:2087/scripts2/doautofixer?autofix=safesshrestart
Take note of the output from running that script, as it may restart ssh on a port other than 22 if somehow the previous ssh instance is still running.
You probably will also want to read:
Why can't I clean a hacked machine - cPanel Knowledge Base - cPanel Documentation
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463