Skip to content

Commit

Permalink
Merge pull request #2053 from chn42/master
Browse files Browse the repository at this point in the history
Fix an issue with ssh -L forwarding (OpenSSL 6.7 onwards only supports ":" as separator to "-L")
  • Loading branch information
dmoagx committed Jan 13, 2015
2 parents e9b8c38 + 4e3fc71 commit 36c6eeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/SPSSHTunnel.m
Expand Up @@ -373,10 +373,10 @@ - (void)launchTask:(id) dummy
[taskArguments addObject:sshHost];
}
if (useHostFallback) {
[taskArguments addObject:[NSString stringWithFormat:@"-L %ld/127.0.0.1/%ld", (long)localPort, (long)remotePort]];
[taskArguments addObject:[NSString stringWithFormat:@"-L %ld/%@/%ld", (long)localPortFallback, remoteHost, (long)remotePort]];
[taskArguments addObject:[NSString stringWithFormat:@"-L %ld:127.0.0.1:%ld", (long)localPort, (long)remotePort]];
[taskArguments addObject:[NSString stringWithFormat:@"-L %ld:%@:%ld", (long)localPortFallback, remoteHost, (long)remotePort]];
} else {
[taskArguments addObject:[NSString stringWithFormat:@"-L %ld/%@/%ld", (long)localPort, remoteHost, (long)remotePort]];
[taskArguments addObject:[NSString stringWithFormat:@"-L %ld:%@:%ld", (long)localPort, remoteHost, (long)remotePort]];
}

[task setArguments:taskArguments];
Expand Down

0 comments on commit 36c6eeb

Please sign in to comment.