using ssh keys for passwordless login
29th December 2023
To enable passwordless ssh to machines on your network use ssh keys
generating keys
ssh-keygen will generate a new key
however if you already have a key it will overwrite it
ls -l ~/.ssh to verify that there are none
ssh-keygen -b 4096
generates a strong key
press enter for default location
enter a passphrase if you want one you can leave it blank to do away with passwords
To copy the key to the server you want to access
first try connecting to the server using a password.
if that works you can do
ssh-copy-id username@ipaddress
you will need to enter the password one last time
from then on you can connect without a password unless you entered a passphrase in the first command.
for more info watch
https://www.youtube.com/watch?v=33dEcCKGBO4