Goal: connect to a remote server by ssh keys (without a password)
on your local computer:
openssl genrsa -rand /dev/random -out id_rsa 2048
then get the public key:
openssl rsa -pubout -in id_rsa -out id_rsa.pub
put those 2 files in your ~/.ssh folder
If you can log in to the server over SSH using a password, you can transfer your RSA key by doing the following from your own computer:
ssh-copy-id <username>@<host>
(this will transfer your public key (id_rsa.pub) to the remote server)
Where