Skip to content

Instantly share code, notes, and snippets.

@piotrkochan
Created March 28, 2022 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotrkochan/b6ad417be19fe3f39c5951bd8691f84f to your computer and use it in GitHub Desktop.
Save piotrkochan/b6ad417be19fe3f39c5951bd8691f84f to your computer and use it in GitHub Desktop.
Generate SSH key with yubikey
#/usr/bin/env bash
ssh-copy-id -i ~/.ssh/id_ed25519_sk_yb1 $1
ssh-copy-id -i ~/.ssh/id_ed25519_sk_yb2 $1
ssh-keygen -t ed25519-sk -i ~/.ssh/id_ed25519_sk_yb1 -C "$(hostname)-$(date +'%d-%m-%Y')-yubikey1"
ssh-keygen -t ed25519-sk -i ~/.ssh/id_ed25519_sk_yb2 -C "$(hostname)-$(date +'%d-%m-%Y')-yubikey2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment