You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
255 B

#!/bin/bash
echo === $0
[ ! -d /root/.ssh ] && {
mkdir /root/.ssh
chmod 700 /root/.ssh
}
k=$(cat /etc/vdn/.ssh/id_rsa.pub)
[ -n "$k" ] && {
! fgrep -q "$k" /root/.ssh/authorized_keys &&
echo "$k" >> /root/.ssh/authorized_keys
}