If you have multiple Raspberry’s or even multiple Unix hosts , you will start to get frustrated at constantly having to enter a password every time you copy files between them or access these devices from another Unix host.
There is an easy way to disable this with RSA key pairs.
- On each host, enter ssh-keygen
- Hit enter to keep the default directory.
- Passphrase. Leave blank and hit enter
- Your keys are created under .ssh/
Now you need to copy over your key to all the other hosts with;
ssh-copy-id -i .ssh/id_rsa.pub username@serverip
Once this is done, you should now be able to copy files or access each device without having to use passwords.
You still need to enter a password when trying to connect from a host that hasn’t got a key.