Create an SSH Key

Published: 2025-04-13 16:27 +1200

Last Update: 2025-04-13 16:27 +1200

Tags: #self-hosting #gemini

Background

I didn't want to have to enter a password every time I SSH'd into my Raspberry Pi.

Create SSH key-pair

On local computer (not the Raspi/server) type:

When prompted, press enter to use default path and filename (probably /home/USER/.ssh/id_rsa).

Copy public key to Raspi / server

Done. All well and good, an ~/.ssh/authorized_keys file should exist on the remote host with the public key. First indication it worked is by SSHing into the device and not being prompted for a password:

Not sure how it does it, but it may copy other keys over in the local device ~/ssh folder, so best to check what public keys are listed in the file:

Remove any that weren't needed.

Resources

How to Create an SSH Key in Linux: Easy Step-by-Step Guide | DigitalOcean