aws: Don't start ssh right away

sshctrl calls sshd directly which won't work at time of the first boot
because no keys will be generated.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-07-12 09:59:31 +01:00
parent 32405d88b0
commit 693208bf63

View File

@@ -226,15 +226,16 @@ import_aws_configuration() {
# Enable SSH
sed -e "s/ENABLE_SSH=.*/ENABLE_SSH=on/g" -i /var/ipfire/remote/settings
touch /var/ipfire/remote/enablessh
chown nobody:nobody /var/ipfire/remote/enablessh
# Enable SSH key authentication
sed -e "s/^ENABLE_SSH_KEYS=.*/ENABLE_SSH_KEYS=on/" -i /var/ipfire/remote/settings
# Apply SSH settings
/usr/local/bin/sshctrl
# Mark SSH to start immediately (but not right now)
touch /var/ipfire/remote/enablessh
chown nobody:nobody /var/ipfire/remote/enablessh
# Firewall rules for SSH and WEBIF
(
echo "1,ACCEPT,INPUTFW,ON,std_net_src,ALL,ipfire,RED1,,TCP,,,ON,,,cust_srv,SSH,,,,,,,,,,,00:00,00:00,,AUTO,,dnat,,,,,second"