ENH move ssh key gen to script

This commit is contained in:
Nathan Dwarshuis 2022-08-28 23:04:41 -04:00
parent 6429455db1
commit e9967e72de
2 changed files with 15 additions and 13 deletions

View File

@ -0,0 +1,15 @@
#! /bin/bash
# generate nicely formatted ssh key pair
if [ -z "$1" ]; then
echo "provide a name/path for the key pair"
exit 1
fi
ssh-keygen -C "$(whoami)@$(uname -n)-$(date -I)" \
-t ed25519 \
-N '' \
-f "$1"

View File

@ -335,19 +335,6 @@ alias_if chezmoi \
cza="chezmoi add" \ cza="chezmoi add" \
czc="chezmoi cd" czc="chezmoi cd"
## --------------------------------------------------
## User functions
## --------------------------------------------------
if exists ssh-keygen; then
function skg () {
ssh-keygen -C "$(whoami)@$(uname -n)-$(date -I)" \
-t ed25519 \
-N '' \
-f "$1"
}
fi
## -------------------------------------------------- ## --------------------------------------------------
## Manly Colors ## Manly Colors
## -------------------------------------------------- ## --------------------------------------------------