bootstrap-vz/providers/raw/assets/one-pubkey.sh

18 lines
320 B
Bash
Raw Normal View History

#!/bin/bash
2013-07-31 08:02:52 +02:00
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