sshtunnel: StrictHostKeyChecking for Dropbear
[feed/packages.git] / net / sshtunnel / files / sshtunnel.init
index 480933edee105c71168ea8404e659436ae74c36f..144d447e84f9583fdb3bf9e3278a98f43341d4b0 100644 (file)
@@ -180,6 +180,9 @@ load_server() {
 
        # dropbear doesn't support -o IdentityFile so use -i instead
        [ -n "$IdentityFile" ] && ARGS_options="$ARGS_options -i $IdentityFile"
+       # dbclient doesn't support StrictHostKeyChecking but it has the -y option that works same
+       [ "$StrictHostKeyChecking" = "accept-new" ] && ARGS_options="$ARGS_options -y"
+       [ "$StrictHostKeyChecking" = "no" ] && ARGS_options="$ARGS_options -yy"
        ARGS="$ARGS_options -o ExitOnForwardFailure=yes -o BatchMode=yes -nN $ARGS_tunnels -p $port $user@$hostname"
 
        procd_open_instance "$server"