How to allow ssh access using PubKeyAuthentication

Hello @MalikAamirAli Happy you are here

To allow public key authentication for ssh access you should go to https://SERVER_IP:8090/firewall/secureSSH → choose SSH Keys and paste your public key

How to create an ssh key in your PC/Laptop

## check existing ssh keys on your pc
$ ls -al ~/.ssh
## generate a new key for cyberpanel
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
## add key to ssh-agent
$ ssh-add ~/.ssh/id_rsa

To copy the public key

$ cat ~/.ssh/id_rsa.pub

paste it to cyberpanel as instructed above

2 Likes