From 1270925d3f8bc99786412ba2c9ac33845e3083fb Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 31 Jul 2021 22:20:54 +0100 Subject: [PATCH] Add script to generate Wireguard keys --- vpn-client.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vpn-client.sh diff --git a/vpn-client.sh b/vpn-client.sh new file mode 100644 index 0000000..78ee6a0 --- /dev/null +++ b/vpn-client.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +usage() { + echo "Usage: vpn-client.sh " + echo "hostname: Name of the new host" + exit 1 +} + +if [ $# != 1 ]; then + usage +fi + +hostname=$1 + +wg genkey | tee "$hostname".key | wg pubkey >"$hostname".pub