SSH Key

1.Create SSH key

ssh-keygen -t rsa -b 2048 -C "[email protected]"

2.Config VPS

sudo nano ~/.ssh/authorized_keys
// then add public key 

sudo nano /etc/ssh/sshd_config
//edit 
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

// restart 
sudo service sshd restart

Last updated