Created
July 9, 2019 17:25
-
-
Save clintcolding/ad759555d5f3f1e5d076bc180ca3a85e to your computer and use it in GitHub Desktop.
Configure Raspberry Pi SSH Keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---- Create key on client ----# | |
ssh-keygen -b 2048 -t rsa | |
#---- Validate creation ----# | |
ls ~/.ssh | |
#---- SSH to Pi and create the SSH directory and file ----# | |
mkdir .ssh | |
cd .ssh | |
touch authorized_keys | |
chmod 700 ~/.ssh/ | |
chmod 600 ~/.ssh/authorized_keys | |
#---- From your client, copy your key to Pi ----# | |
cat ~/.ssh/id_rsa.pub | ssh pi@192.168.1.2 'cat >>.ssh/authorized_keys' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment