SSH root access denied/ missing /etc/ssh folder
Hello guys,
This is the first time I have to create a post. I usually find all the info I need in other threads created by other users but this case seems more complicated.
Long story short I am the new admin of a VPS, I can access whm via web with root credential but I can only login via ssh by the user credential.
I tried to change the root password from whm but via ssh is not recognised. I went inside the /etc/ folder since I was looking for the ssh config just to figure out that the entire ssh folder is missing. My client contacted Godaddy to get help on a system level but they told him that I need to change the setting of the ssh config file. This means that they didn't even check the VPS. So, the entire folder is missing. How can I have that folder recreated with the default files? By removing and installing th SSH service again? If so, can you help me with some commands? Many thanks
Password:
Last login: Mon Nov 7 14:08:06 2016 from somesrvrname.secureserver.net
[newuser@cp ~]$ su -
Password:
su: incorrect password
[newuser@cp ~]$ sudo
sudo: effective uid is not 0, is sudo installed setuid root?
I tried to change the root password from whm but via ssh is not recognised. I went inside the /etc/ folder since I was looking for the ssh config just to figure out that the entire ssh folder is missing. My client contacted Godaddy to get help on a system level but they told him that I need to change the setting of the ssh config file. This means that they didn't even check the VPS. So, the entire folder is missing. How can I have that folder recreated with the default files? By removing and installing th SSH service again? If so, can you help me with some commands? Many thanks
-
su: incorrect password
Please make sure that you are using correct root password. If you are still facing issue with correct password then please try to resetting your SSH configuration from Web Host Manager with the following URL:https://IP:2087/cpsess12345678/scripts2/doautofixer?autofix=safesshrestart
You would replace "IP" with the server's IP address0 -
Hello and thank you for your reply. The root password is 100% correct. This is the output of the script: AutoFixer Execution Requesting script ... Done. Executing script ... Attempting to locate sshd binaries installed on the system ...
Located /usr/sbin/sshd
Done.
Killing exisiting sshd processes...
Stopping sshd: [ OK ]
Done.
configuring sshd to run on port 22
/usr/sbin/sshd successfully started!
root 12265 0.0 0.0 66240 1312 ? Rs 06:48 0:00 /usr/sbin/sshd -f /var/cpanel/safe_sshd
Done.
The issue is still there and the ssh folder in the /etc/ is still missing. @SysSachin Any other ideas?0 -
Hi, After resetting your SSH configuration then try to access direct with root user and use default ssh port (22) 0 -
it worked, thank you very much!! can a mod please set this thread as solved? 0 -
Hello, I'm happy to see the issue is now resolved. Documentation on the WHM Autofixer scripts is available at: WHM FAQ - Documentation - cPanel Documentation Thanks! 0
Please sign in to leave a comment.
Comments
5 comments