sshtunnel: Use -i $IdentityFile instead of -o IdentityFile=$IdentityFile
authorSergey Ponomarev <[email protected]>
Sat, 3 Jun 2023 10:23:35 +0000 (13:23 +0300)
committerNuno Goncalves <[email protected]>
Sun, 8 Oct 2023 09:29:37 +0000 (10:29 +0100)
This makes the sshtunnel compatible with Dropbear.

Signed-off-by: Sergey Ponomarev <[email protected]>
net/sshtunnel/files/sshtunnel.init

index 4a23c9fbe74f38723699edb4fc73701aa1cbdcdf..480933edee105c71168ea8404e659436ae74c36f 100644 (file)
@@ -174,10 +174,12 @@ load_server() {
        config_foreach validate_tunnelW_section "tunnelW" load_tunnelW
        [ "$count" -eq 0 ] && { _err "tunnels to $server not started - no tunnels defined"; return 1; }
 
-       append_params CheckHostIP Compression CompressionLevel IdentityFile \
+       append_params CheckHostIP Compression CompressionLevel \
                LogLevel PKCS11Provider ServerAliveCountMax ServerAliveInterval \
                StrictHostKeyChecking TCPKeepAlive VerifyHostKeyDNS
 
+       # dropbear doesn't support -o IdentityFile so use -i instead
+       [ -n "$IdentityFile" ] && ARGS_options="$ARGS_options -i $IdentityFile"
        ARGS="$ARGS_options -o ExitOnForwardFailure=yes -o BatchMode=yes -nN $ARGS_tunnels -p $port $user@$hostname"
 
        procd_open_instance "$server"