first of all you need to generate the keys. It’s really simple:
ssh-keygen -t rsa
Answer always yes to all of the questions
if you go in .ssh directory and type ls
cd .ssh
ls
you can see something like that:
id_rsa id_rsa.pub
Now you have to add the public key to the file authorized_keys
cat id_rsa.pub >> authorized_keys
Move your private key into your PC:
scp debian@DOMAIN.eu://home/debian/.ssh/id_rsa .
Finally move the private key under ssh
mv id_rsa .ssh/
Leave a Reply