{ "id": "https://www.tunbury.org/2019/09/16/raspberry-pi-ssh-keys", "title": "Raspberry PI SSH Keys", "link": "https://www.tunbury.org/2019/09/16/raspberry-pi-ssh-keys/", "updated": "2019-09-16T12:41:29", "published": "2019-09-16T12:41:29", "summary": "This is my cheatsheet based upon Passwordless SSH access on the official Raspberry PI website.", "content": "
This is my cheatsheet based upon Passwordless SSH access on the official Raspberry PI website.
\n\nOn the Mac create a key (once) with a passcode
\n\nssh-keygen\nAdd the key to your Mac keychain
\n\nssh-add -K ~/.ssh/id_rsa\nOptionally create a file ~/.ssh/config with these contents which contains the UseKeychain yes line which tells OSX to look at the keychain for the passphrase.
Host *\n UseKeychain yes\n AddKeysToAgent yes\n IdentityFile ~/.ssh/id_rsa\nThen copy your key to your Raspberry PI
\n\nssh-copy-id pi@192.168.1.x\nSSH to the PI
\n\nssh pi@192.168.1.x\nNext edit your /etc/ssh/sshd_config to turn off plain text password authentication and restart sshd.
sudo sed -i \"s/#PasswordAuthentication yes/PasswordAuthentication no/g\" /etc/ssh/sshd_config\nsudo /etc/init.d/ssh restart\nNow you can SSH without a password and without getting pestered that the default password hasn’t been changed.
", "content_type": "html", "author": { "name": "Mark Elvers", "email": "mark.elvers@tunbury.org", "uri": null }, "categories": [ "raspberrypi" ], "source": "https://www.tunbury.org/atom.xml" }