How to setup SSH keys

Create RSA Key Pair

ssh-keygen -t rsa

Create .ssh folder

mkdir ~/.ssh

Set right permissions

chmod 700 ~/.ssh

Create authorized_keys file

touch ~/.ssh/authorized_keys

Set right permissions

chmod 600 ~/.ssh/authorized_keys

Add public key to the authorized_keys

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Categories: Debian Tags: , , ,
%d bloggers like this: