aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/sshwiz
blob: ba71b089c92f213a758129aaf8329c81396adad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 <destination>"
	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"