Thicket data repository for the EEG
at main 2.0 kB view raw
1{ 2 "id": "https://www.tunbury.org/2019/09/16/raspberry-pi-ssh-keys", 3 "title": "Raspberry PI SSH Keys", 4 "link": "https://www.tunbury.org/2019/09/16/raspberry-pi-ssh-keys/", 5 "updated": "2019-09-16T12:41:29", 6 "published": "2019-09-16T12:41:29", 7 "summary": "This is my cheatsheet based upon Passwordless SSH access on the official Raspberry PI website.", 8 "content": "<p>This is my cheatsheet based upon <a href=\"https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md\">Passwordless SSH access</a> on the official Raspberry PI website.</p>\n\n<p>On the Mac create a key (once) with a passcode</p>\n\n<div><div><pre><code>ssh-keygen\n</code></pre></div></div>\n\n<p>Add the key to your Mac keychain</p>\n\n<div><div><pre><code>ssh-add -K ~/.ssh/id_rsa\n</code></pre></div></div>\n\n<p>Optionally create a file <code>~/.ssh/config</code> with these contents which contains the <code>UseKeychain yes</code> line which tells OSX to look at the keychain for the passphrase.</p>\n\n<div><div><pre><code>Host *\n UseKeychain yes\n AddKeysToAgent yes\n IdentityFile ~/.ssh/id_rsa\n</code></pre></div></div>\n\n<p>Then copy your key to your Raspberry PI</p>\n\n<div><div><pre><code>ssh-copy-id pi@192.168.1.x\n</code></pre></div></div>\n\n<p>SSH to the PI</p>\n\n<div><div><pre><code>ssh pi@192.168.1.x\n</code></pre></div></div>\n\n<p>Next edit your <code>/etc/ssh/sshd_config</code> to turn off plain text password authentication and restart <code>sshd</code>.</p>\n\n<div><div><pre><code>sudo sed -i \"s/#PasswordAuthentication yes/PasswordAuthentication no/g\" /etc/ssh/sshd_config\nsudo /etc/init.d/ssh restart\n</code></pre></div></div>\n\n<p>Now you can SSH without a password and without getting pestered that the default password hasn’t been changed.</p>", 9 "content_type": "html", 10 "author": { 11 "name": "Mark Elvers", 12 "email": "mark.elvers@tunbury.org", 13 "uri": null 14 }, 15 "categories": [ 16 "raspberrypi" 17 ], 18 "source": "https://www.tunbury.org/atom.xml" 19}