How to disable SSH access for a website


I’ve managed to have SFTP / SSH access with the option “set ip SSH access” on a website. But how i can delete this access later if is not necessary anymore ?

Hello @santxuss

I do not understand your question

What is the issue? Did you enable secure ssh ?


Basically, I want to remove ssh / SFTP access to the user on a specific website.

You can disable root login here https://SERVER_URL:8090/firewall/secureSSH

I don’t want to disable ssh for the server, only for the user created under “set up SSH access”

So, for example, I have, if I go to manage website , set up SSH access i can create access for a user generated by cyberpanel and i can configure the password there. With this, i have ssh and SFTP access for that user only to folder. But later if i don’t want to provide access to this user to folder via ssh, how i can disable it ?

You mean https://SERVER_URL:8090/websites/

I only how to do it from ssh terminal

Get all users with access

cat /etc/shadow | grep '^[^:]*:[^\*!]'

And use the oldschool way to disable user access via /etc/ssh/sshd_config e.g.

You see SSH user for is customer6413 on https://SERVER_URL:8090/websites/

Or just findout via cat /etc/passwd command then deny access by adding to /etc/ssh/sshd_config

DenyUsers customer6413

just disable the password authentication from the etc/ssh/sshd-config

I think will be a good option to have whan setting up packages to add or remove SSH access or what do we think?

Thank you, will do it that way.

I believe that is a good option, or at least add the option to delete ssh access on the same site where we can add ssh access.

Also, I have a question, when a website is deleted, the user is also deleted?

1 Like