Securing SSH is one of the most important task of a system administrator. CyberPanel allows you to change SSH port, disable root login and save your SSH keys.
Hello Sir, I am mistakely disabled SSH permit root login. Now I can’t login to Cyber Panel. I don’t have SSH Key. I want your help in this matter. I hope you will help me in this matter.
Sir, I have not collected any keys from the cyber panel. I have mistakenly disabled the permit root login. After disabling, I could not log in to the cyber panel again.
I have cyber panel login access but I am not logging in. After disabling SSH permit root login the login page is not opening. And if you login with putty software, you will not login.
You need to contact your service provider in that case, they can help you recover the access. Not much CyberPanel can do if you don’t have access to CyberPanel
To enable permit root login in CyberPanel, follow these steps:
Log in to your CyberPanel server as the root user.
Open the SSH configuration file using a text editor, such as Nano:
Copy code
nano /etc/ssh/sshd_config
Locate the line that reads “PermitRootLogin no” and change it to “PermitRootLogin yes”.
Save and close the file.
Restart the SSH service to apply the changes:
Copy code
systemctl restart ssh
This will disable root login via SSH for your CyberPanel server. Please note that you should still be able to log in as the root user using other methods, such as the console or a terminal emulator. It is generally considered a best practice to disable root login via SSH for security reasons.
But I still have an issue where the login page cannot be accessed
I accidentally generated the key pair inside my cyberpanel. Now, if I try to paste the key generated from my local machine it won’t let me paste it in secure SSH. is there any work around on how to fix this?
I too was having problems with SSH to my VPS as root.
The instructions at the top of this post is the only way I solved it but after great deliberation.
For me the last line in the post was causing the issue.
ssh -i ~/.ssh/cyberpanel.pub root@
For me I was using Windows Terminal. What I realised was that I was being told to push the wrong file.
If anyone reading this is still having problems then try running the last command with out the pub extension, that is the wrong key file.
ssh -i ~/.ssh/cyberpanel root@
Try that command instead and see how that works out for you.