I access my Raspberry via ssh user@raspberrypi.local
from my Mac. When doing this, I enter the password of the Pi user.
I have tried to find ways to make my Raspberry more secure, and stumbled across some posts suggesting that I generate SSH keys.
Is using SSH keys more secure than simply running the command above when I wish to connect?
I'm not quite understanding if SSH keys mainly are used for password-less access, or if they are chiefly used to prevent computers that don't have the private key (id_rsa
) to access them. If it's the latter, then I presume that this increases security compared to allowing anyone to start a SSH tunnel in as long as they can break the password.
Also, if I choose to use SSH keys, should I generate id_rsa
on my Mac and give id_rsa.pub
to my Raspberry, or the other way around?
root
logins only really improves security when you also disablesudo
for all SSH users. – Dmitry Grigoryev Sep 23 '19 at 07:09