From e9967e72deb69203337400917e35ac156e11e374 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 28 Aug 2022 23:04:41 -0400 Subject: [PATCH] ENH move ssh key gen to script --- dot_bin/executable_ssh-def-keygen | 15 +++++++++++++++ dot_config/zsh/dot_zshrc.tmpl | 13 ------------- 2 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 dot_bin/executable_ssh-def-keygen diff --git a/dot_bin/executable_ssh-def-keygen b/dot_bin/executable_ssh-def-keygen new file mode 100644 index 0000000..edb89a8 --- /dev/null +++ b/dot_bin/executable_ssh-def-keygen @@ -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" + + diff --git a/dot_config/zsh/dot_zshrc.tmpl b/dot_config/zsh/dot_zshrc.tmpl index 69df32f..67da7a8 100644 --- a/dot_config/zsh/dot_zshrc.tmpl +++ b/dot_config/zsh/dot_zshrc.tmpl @@ -335,19 +335,6 @@ alias_if chezmoi \ cza="chezmoi add" \ 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 ## --------------------------------------------------