Blog Home
Updated: 2023 Oct 09

Create a new SSH key

  1. Open a terminal on your workstation and use the ssh-keygen command to generate a new key
ssh-keygen -t rsa -f ~/.ssh/[KEY_FILENAME] -C [USERNAME]
  1. Restrict access to your private key so that only you can read it and nobody can write to it.
chmod 400 ~/.ssh/[KEY_FILENAME]
  1. Generate a new SSH key that uses Ed25519 algorithm
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "john@example.com"
  1. Adding your key to ssh agent
ssh-add ~/.ssh/id_ed25519

Reference:

Comments:

Email questions, comments, and corrections to hi@smartisan.dev.

Submissions may appear publicly on this website, unless requested otherwise in your email.