I recently decided to disable Root Access, to my VPS, via SSH/PuTTy. This being an obvious effort to increase the security of the VPS.
I achieved this by heading into /etc/ssh/sshd_config
and performing the following line changes:
PermitRootLogin yes
toPermitRootLogin no
PasswordAuthentication yes
toPasswordAuthentication no
I then logged into the VPS, via PuTTy and restarted SSH by placing the following command:
service ssh reload
I had no problems with the above but I now wish to regain access Root access to the VPS. I thought it would be as simple as reversing the steps I performed in the /etc/ssh/sshd_config
file. Unfortunately, this does not seem to be the case. I assume it is because I need to reload the SSH for any changes to take effect. Something I obviously cannot do, without having access in the first place.
What other options do I have, in allowing myself to regain this Root access?
Solutions to date ...
- I assigned
bin/bash (chrooted)
SSH Access to another user. Logged in via PuTTy, with this user, the tried to reload SHH from here. Unfortunately, the command was not recognised when logged in with this user.