- Generate a key pair on your machine:
$ ssh-keygen
Enter the name of the files with the keys and passphrase (not necessary). - Add your public key to the list of authorized keys on the remote machine:
cat ~/.ssh/id_rsa.pub | ssh user@machine "cat >> ~/.ssh/authorized_keys"
- Set permissions on the remote machine:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
No comments:
Post a Comment