summaryrefslogtreecommitdiff
path: root/unpenme
blob: a712b91cc2c116d8af4f9cde19532d94cc5a92a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
if [ "$(id -u)" -ne 0 ]
then
        exec sudo -- "$0" "$@"
fi
sedprog='/ penme host key @ [0-9]+\.[0-9].[0-9]+\.[0-9]+/ d'
FORREALS=-i~penme
sed ${FORREALS} -E -e "$sedprog"  /root/.ssh/authorized_keys
if [ -t 1 ]
then
        diff /root/.ssh/authorized_keys${FORREALS#-i} /root/.ssh/authorized_keys
fi