An SSH key pair has two parts: a private key that stays with you, and a public key that you can place on servers in authorized_keys.

The SSH Key Generator tool gives me a safe place to test the idea before I put it into a script, server, or production workflow.

The simple mental model

An SSH key pair has two parts: a private key that stays with you, and a public key that you can place on servers in authorized_keys.

I try to reduce the tool to one question: what input do I have, what output do I expect, and what would make the result unsafe or misleading?

Step 1: Choose Ed25519 unless you have a compatibility reason not to

Choose Ed25519 unless you have a compatibility reason not to.

Start with a small example first. A small example is easier to inspect than a real production-sized case.

Step 2: Generate the key pair

Generate the key pair.

Step 3: Save the private key somewhere private

Save the private key somewhere private.

Step 4: Copy the public key to the server or service

Copy the public key to the server or service.

Step 5: Use the fingerprint to identify the key later

Use the fingerprint to identify the key later.

Step 6: Protect private keys with file permissions and passphrases when appropriate

Protect private keys with file permissions and passphrases when appropriate.

Step 7: Remove old keys from servers when they are no longer needed

Remove old keys from servers when they are no longer needed.

My checklist

Before I trust the result, I check:

  • Choose Ed25519 unless you have a compatibility reason not to.
  • Generate the key pair.
  • Save the private key somewhere private.
  • Copy the public key to the server or service.
  • Use the fingerprint to identify the key later.
  • Protect private keys with file permissions and passphrases when appropriate.
  • Remove old keys from servers when they are no longer needed.

The tool saves time, but the important part is still understanding the input and reviewing the output before using it somewhere important.

Comments

Comments are welcome — please read the comment policy first. Powered by giscus and GitHub Discussions.