- See this article if for some reason SSH isn't already enabled on your Pi.
- Create your keys on your host machine if you haven't yet (see RSA vs DSA for key type info):
- It's OK to use blank password defaults, unless you want the extra layer of security.
- Copy the public key to your Pi (replace the IP below with whatever your Pi's address is; use
ifconfig
on your Pi if needed to figure it out):
scp ~/.ssh/id_rsa.pub pi@192.168.0.xx:~
- Connect to your Pi, being prompted still for your password one final time before kicking in your authentication keys:
// SSH in from the host: ssh pi@192.168.0.xx // Enter your password, for the last time // Finally, pipe the SCP'ed public key into the authorized_keys file: cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
mkdir ~/.ssh
ssh-keygen -t rsa
Now you can log into your Pi from your host machine, securely, without being prompted for a password again.
No comments :
Post a Comment