diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-08-07 15:47:14 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-08-07 15:47:14 +0300 |
commit | bf9efeca649af6128fb4c0171299ad3f65485b6e (patch) | |
tree | 1bf50125db4472a33a9f5c75e4752911eec95dd9 /set-authorized-keys | |
parent | 71027842bfe4ed647e8229f3153cd38397d93a7f (diff) | |
download | v-i-bf9efeca649af6128fb4c0171299ad3f65485b6e.tar.gz |
chore: drop obsolete set-authorized-key, set-user-ca-pubkey scripts
Sponsored-by: author
Diffstat (limited to 'set-authorized-keys')
-rwxr-xr-x | set-authorized-keys | 31 |
1 files changed, 0 insertions, 31 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" |