- Create public and private keys using ssh-key-gen on local-host
- Add public identity to ssh agent
- Copy the public key to remote-host using ssh-copy-id
- Check authorized_keys to check duplicated keys
Create public and private keys using ssh-key-gen on local-host
ssh-key-gen
Add public identity to ssh agent
ssh-add
=> enter passphrase
Copy the public key to remote-host using ssh-copy-id
ssh-copy-id appends public key to authorized key on remote host
ssh-copy-id -i ~/ssh/id_rsa.pub remote-host
Check authorized_keys file for duplicated entries
cat ~/.ssh/authorized_keys
login
ssh remote-host