From d6242cfef055cfbe84b3507416ac376fabc9bde9 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 20 Jan 2022 13:12:24 +0000 Subject: [PATCH] Remove incomplete script --- utils/scripts/cassh-install-hostkeys.sh | 80 ------------------------- 1 file changed, 80 deletions(-) delete mode 100644 utils/scripts/cassh-install-hostkeys.sh diff --git a/utils/scripts/cassh-install-hostkeys.sh b/utils/scripts/cassh-install-hostkeys.sh deleted file mode 100644 index 8ddd46d..0000000 --- a/utils/scripts/cassh-install-hostkeys.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# env -# Written in 2022 by Lucas -# CC0 1.0 Universal/Public domain - No rights reserved -# -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any -# warranty. You should have received a copy of the CC0 Public Domain -# Dedication along with this software. If not, see -# . - -usage() -{ - printf "Usage: %s [-c] [-l login_name] host ...\n" "${0##*/}" >&2 - exit 1 -} - -err() -{ - printf "%s: %s\n" "${0##*/}" "$*" >&2 - exit 1 -} - -login_name=$(id -nu) -agent_mode=yes -while getopts cl: flag; do - case $flag in - c) agent_mode=confirm ;; - l) login_name=$OPTARG ;; - *) usage - esac -done -shift $(($OPTIND - 1)) -[ $# -gt 0 ] || usage - -if [ -z "$SSH_AUTH_SOCK" ] || [ ! -S "$SSH_AUTH_SOCK" ]; then - eval $(ssh-agent -s) - trap 'eval $(ssh-agent -ks)' EXIT INT QUIT TERM -fi - -set -e - -for host; do - [ -d "$host" ] || err "no host keys for $host" - - # Load correct key into ssh-agent. - ssh -o AddKeysToAgent=$agent_mode "$login_name@$host" true - - tmpdir=$(ssh "$login_name@$host" mktemp -dt hostkeys.XXXXXX) - - sftp "$login_name@$host" <\"$tmpdir/install-hostkeys.sh\"" <