]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
aws: Don't start ssh right away
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Jul 2018 08:59:31 +0000 (09:59 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Jul 2018 08:59:31 +0000 (09:59 +0100)
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>
src/initscripts/helper/aws-setup

index 0ae727c3ff8ea7217cee72e1026979dd4fd37035..a273aff7d44944d4fec926b51cf0a2df4e427e82 100644 (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"