aboutsummaryrefslogtreecommitdiff
path: root/scripts/local/rotate-ssh-keys.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-10 22:21:38 -0300
committerEuAndreh <eu@euandre.org>2019-06-10 23:26:02 -0300
commit217d2863709ebbe1ed766a360edb228e8899fc68 (patch)
tree098d505648c380bd3af6430d9e222c621f776f5f /scripts/local/rotate-ssh-keys.sh
parentTODOs.org (diff)
downloadtoph-217d2863709ebbe1ed766a360edb228e8899fc68.tar.gz
toph-217d2863709ebbe1ed766a360edb228e8899fc68.tar.xz
Output all generated files on ./generated/, refactor .envrc variables
Diffstat (limited to 'scripts/local/rotate-ssh-keys.sh')
-rwxr-xr-xscripts/local/rotate-ssh-keys.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/local/rotate-ssh-keys.sh b/scripts/local/rotate-ssh-keys.sh
new file mode 100755
index 0000000..337f351
--- /dev/null
+++ b/scripts/local/rotate-ssh-keys.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+set -Eeuo pipefail
+cd "$(dirname "${BASH_SOURCE[0]}")"
+cd ../../
+
+rm -f ./secrets/ssh/*
+ssh-keygen -t rsa -b 4096 -q -N '' -f ./secrets/ssh/vps-box-client
+ssh-keygen -t rsa -b 4096 -q -N '' -f ./secrets/ssh/vps-box-server
+
+git add ./secrets/ssh/
+git commit -m "Script: rotate SSH keys"