From 853bb5bdd92cc18dea87f0bd17ef8fc191cf2f18 Mon Sep 17 00:00:00 2001 From: Yaroslav de la Peña Smirnov Date: Wed, 27 Aug 2025 14:45:33 +0300 Subject: sshwiz: script for preparing host for first login Copies keys and installs terminfo to a remote machine. --- dotfiles/.local/bin/sshwiz | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 dotfiles/.local/bin/sshwiz (limited to 'dotfiles') diff --git a/dotfiles/.local/bin/sshwiz b/dotfiles/.local/bin/sshwiz new file mode 100755 index 0000000..ba71b08 --- /dev/null +++ b/dotfiles/.local/bin/sshwiz @@ -0,0 +1,18 @@ +#!/bin/bash + +# SSH "wizard" script. Copies the public key and installs terminfo for first +# time use of a host. + +if [ -z "$1" ]; then + echo "usage: sshwiz " + exit 1 +fi + +target=$1 + +ssh-copy-id $target +echo "installing terminfo..." +infocmp $TERM > /tmp/$TERM.terminfo +rsync /tmp/$TERM.terminfo ${target}: +ssh $target "tic -x $TERM.terminfo" +echo "done" -- cgit v1.2.3