Remove authorized_keys file after setup is done

This commit is contained in:
Johannes Zellner
2016-07-29 18:43:36 +02:00
parent f0ee52505c
commit ce28449734

View File

@@ -112,6 +112,13 @@ if ! $ssh22 "root@${server_ip}" "/bin/bash /home/ubuntu/initializeBaseUbuntuImag
exit 1
fi
echo "Strip ssh key"
if ! $ssh22 "root@${server_ip}" "rm /root/.ssh/authorized_keys"; then
echo "Unable to remove ssh access"
echo "Make sure to cleanup the ec2 instance ${instance_id}"
exit 1
fi
snapshot_name="cloudron-${pretty_revision}-${now}"
echo "Creating ami image ${snapshot_name}"