dotfiles/script/gensshkey

10 lines
250 B
Bash
Executable File

#!/usr/bin/env bash
#
# Generate a new SSH keypair.
# https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54
set -e
ssh-keygen -o -a 100 -t ed25519 -f "$HOME/.ssh/id_ed25519" -C "$USER@$(hostname -s)"
cat "$HOME/.ssh/id_ed25519.pub"