fuel-library/deployment/puppet/cobbler/templates/snippets/centos_authorized_keys.erb
Kir Vondreth 4ea4adc4f3 Add new snippet ubuntu_authorized_keys
Adds a new snippet for setting up the /root/.ssh/authorized_keys in Ubuntu
carriage returns in keys are escaped in the preseed
they are put back with command echo -e
existing authorized_keys renamed centos_*

Change-Id: Ia9b77d418a27f86665671c323ae0e23002907456
Closes-Bug: #1277253
2014-02-17 17:52:29 +01:00

10 lines
259 B
Plaintext

#set $authorized_keys = str(open("/etc/cobbler/authorized_keys", "r").read())
mkdir -p /root/.ssh
chown root:root /root/.ssh
chmod 700 /root/.ssh
cat > /root/.ssh/authorized_keys <<EOF
$authorized_keys
$auth_key
EOF
chown root:root /root/.ssh/authorized_keys