Today we will set up SSH keys on a Raspberry Pi.
For this you will need a Raspberry Pi with any OS and terminal access. I'm using the latest release of raspbian stretch.
You will also need minimal knowledge of SSH keys and you should generate keys for your Pi before starting.  If you need help with either
of these check out my SSH Keys playlist.
Log into your Pi and run cd .ssh. If the folder doesn't exist, create it by running ssh-keygen and using the default values.
Open the public key you wish to use. If it is in this format, put it on one line starting with the key
algorithm, then contents, then comment and copy it. Run
nano authorized_keys. Paste your key by right-clicking,
then press Ctrl+X to exit, Y to save, and enter to confirm the file name. In a new window,
confirm you can SSH in with your SSH key. Now, let's disable password logins. Run
sudo nano /etc/ssh/sshd_config
Go to the line that says #PasswordAuthentication yes. Remove the pound sign and change
"yes" to "no". Press Ctrl+X to exit, Y to save, and enter to confirm the file name.
Run sudo /etc/init.d/ssh restart
to restart your SSH service and apply the changes. In a new window, confirm
you cannot login with your password then check once more that you can log in with your ssh key
Thank you for watching and I hope you enjoyed this episode of the Wilson minute
If you did make sure to like, subscribe, comment,
and, if applicable, watch the next and previous videos in this series.
If you would like to help support this channel I have listed ways to do so in the video's description
Open mouth, insert coffee...
Yippee!!!
