2 - Secure SSH

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:
/root/.ssh

Here

2 Likes

I got the same issue here,

Is there has anyone solved the issue?

The login page is not displayed, but I still have access via SSH

the main problem is login page cannot be accessed, it just blank

I got the solution

To enable permit root login in CyberPanel, follow these steps:

  1. Log in to your CyberPanel server as the root user.
  2. Open the SSH configuration file using a text editor, such as Nano:

Copy code

nano /etc/ssh/sshd_config
  1. Locate the line that reads “PermitRootLogin no” and change it to “PermitRootLogin yes”.
  2. Save and close the file.
  3. 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

When i paste my public key and click SAVE then i receive error:

“Could not connect. Please refresh this page.”

Why? How to fix it? I cant add key.

regards

How do I generate SSH key for Rsync.net?

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?

Generate new Keys pair, add the .pub content to cyberpanel ssh key value. Should be ok. Once you can login. Go ahead delete the old one

Well none is working for me i still get permission denied

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.

Best of luck
T

Did I lose my “home” folder and all website files?

I was configuring SSH access security.

I changed the door, accessed it, everything was fine.

I went back to the panel, went to key configuration. I put a key in, clicked to save.

There was an error on the page, I refreshed it, I no longer accessed the panel. I tried to access the website, it didn’t open anymore. I tried to connect via FTP, but “421 Home directory not available”.

What happened, after all, I lost my installation and, with it, all the site files?

How can I correct this and regain access via IP, as I had to return the site to the previous server while I resolve this situation?