bootstrap-vz/providers/raw/assets/one-pubkey.sh
2013-08-01 08:20:32 +02:00

17 lines
320 B
Bash
Executable file

#!/bin/bash
echo "Reconfigure host ssh keys"
dpkg-reconfigure openssh-server
if [ ! -e /root/.ssh ]; then
mkdir /root/.ssh
touch /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi
echo "Copy public ssh keys to authorized_keys"
for f in /mnt/*.pub
do
cat $f >> /root/.ssh/authorized_keys
done