2 - Secure SSH

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.

Basic Security

Server > Security > Secure SSH

On this page you can control two settings:

  • Change Default SSH Port.

  • Allow/Disallow Root Login.

SSH Keys

To add your SSH keys, you first need to generate a pair of a public/private key.

On your local machine

cd ~/.ssh
ssh-keygen -t rsa -f cyberpanel -C root

This will generate two files cyberpanel and cyberpanel.pub.

You need to copy contents of cyberpanel.pub and paste in the following box:

Now on your local machine you can login without needing a root password using:

ssh -i ~/.ssh/cyberpanel.pub root@<IP Address>

1 Like

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.

You can add your key from CyberPanel, similarly you can also enable root login from CyberPanel using the document above.

1 Like

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.

You dont have SSH or CyberPanel access?

1 Like

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

No, i dont have access to CyberPanel login. login page is not displaying. I tried putty and windows powershell to access cyberpanel.

Try to Disable the ad blocker, Sometimes Cyberpanel login page not load properly/display because of the ad blocker.

cyberpanel and cyberpanel.pub can be found in this folder: