repositories / bugabinga.net
bugabinga.net
personal infrastructure for bugabinga!
owned by admin
create_keys.sh
Raw#!/usr/bin/env bash
set -euo pipefail
# Generate key pair (no passphrase)
ssh-keygen -t ed25519 -f ssh_host_ed25519_key -N "" -C "root@bugabinga-relay"
# View the values to copy into secrets.auto.tfvars
echo "ssh_host_key_ed25519_private:"
cat ssh_host_ed25519_key
echo -e "\nssh_host_key_ed25519_public:"
cat ssh_host_ed25519_key.pub
# Generate VPS (Server) Keys
wg genkey | tee wg_server_private.key | wg pubkey >wg_server_public.key
# Generate Home Server (Peer) Keys (if you don't have them yet)
wg genkey | tee wg_peer_private.key | wg pubkey >wg_peer_public.key
# View the values
echo "VPS Private Key (for wg_server_private_key):"
cat wg_server_private.key
echo -e "\nVPS Public Key (put this in your Home Server config):"
cat wg_server_public.key
echo -e "\nPeer Public Key (for wg_peer_public_key):"
cat wg_peer_public.key
echo -e "\nPeer Private Key (put this in your Home Server config):"
cat wg_peer_private.key