diff options
Diffstat (limited to 'nix/generate-keys.sh')
| -rwxr-xr-x | nix/generate-keys.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nix/generate-keys.sh b/nix/generate-keys.sh new file mode 100755 index 0000000..611d931 --- /dev/null +++ b/nix/generate-keys.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Generate a host key for a specific host +set -euo pipefail + +HOST="$1" +mkdir -p "./host-keys/${HOST}" +ssh-keygen -t ed25519 -f "./host-keys/${HOST}/ssh_host_ed25519_key" -N "" +echo "✅ Generated host key for ${HOST}" +echo "" +echo "👉 Derive age public key with:" +# echo " cat ./host-keys/${HOST}/ssh_host_ed25519_key.pub | nix run nixpkgs#ssh-to-age" +echo " cat ./host-keys/${HOST}/ssh_host_ed25519_key.pub | ssh-to-age" |
