]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
aws: Enable SSH on the first start
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 27 Jun 2018 08:55:09 +0000 (09:55 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 27 Jun 2018 08:55:39 +0000 (09:55 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/helper/aws-setup

index 791bbb2512f09e9b5fab866ff81dedf2be53bd58..d79ac2a764d5d433732d9be77300f173dde41e62 100644 (file)
@@ -157,15 +157,15 @@ import_aws_configuration() {
                fi
        done
 
-       # Enable SSH
-       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
-
        # Actions performed only on the very first start
        if [ ! -e "/var/ipfire/main/firstsetup_ok" ]; then
+               # Enable SSH
+               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
+
                # 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"