summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-08-07 15:47:14 +0300
committerLars Wirzenius <liw@liw.fi>2022-08-07 15:47:14 +0300
commitbf9efeca649af6128fb4c0171299ad3f65485b6e (patch)
tree1bf50125db4472a33a9f5c75e4752911eec95dd9
parent71027842bfe4ed647e8229f3153cd38397d93a7f (diff)
downloadv-i-bf9efeca649af6128fb4c0171299ad3f65485b6e.tar.gz
chore: drop obsolete set-authorized-key, set-user-ca-pubkey scripts
Sponsored-by: author
-rwxr-xr-xset-authorized-keys31
-rwxr-xr-xset-user-ca-pubkey32
2 files changed, 0 insertions, 63 deletions
diff --git a/set-authorized-keys b/set-authorized-keys
deleted file mode 100755
index 2151bc9..0000000
--- a/set-authorized-keys
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-set -eu -o pipefail
-
-die() {
- echo "ERROR: $*" 1>&2
- exit 1
-}
-
-cleanup() {
- umount "$drive" || true
- rmdir "$mnt"
-}
-
-trap cleanup EXIT
-
-drive="$1"
-pubkey="$2"
-
-[ -e "$drive" ] || die "$drive does not exist"
-[ -e "$pubkey" ] || die "$pubkey does not exist"
-
-mnt="$(mktemp -d)"
-mount "$drive" "$mnt"
-if [ ! -e "$mnt/root/.ssh" ]; then
- install -d "$mnt/root/.ssh"
-fi
-
-authz="$mnt/root/.ssh/authorized_keys"
-[ ! -e "$authz" ] || die "$authz already exists"
-install -m 0600 "$pubkey" "$authz"
diff --git a/set-user-ca-pubkey b/set-user-ca-pubkey
deleted file mode 100755
index 0bac587..0000000
--- a/set-user-ca-pubkey
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-set -eu -o pipefail
-
-die() {
- echo "ERROR: $*" 1>&2
- exit 1
-}
-
-cleanup() {
- umount "$drive" || true
- rmdir "$mnt"
-}
-
-trap cleanup EXIT
-
-drive="$1"
-pubkey="$2"
-
-[ -e "$drive" ] || die "$drive does not exist"
-[ -e "$pubkey" ] || die "$pubkey does not exist"
-
-mnt="$(mktemp -d)"
-mount "$drive" "$mnt"
-
-include="$mnt/etc/ssh/sshd_config.d/userca.conf"
-echo "TrustedUserCAKeys /etc/ssh/user_ca_keys" >"$include"
-chown root:root "$include"
-chmod 0644 "$include"
-
-cakeys="$mnt/etc/ssh/user_ca_keys"
-install -m 0600 "$pubkey" "$cakeys"