aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSSHTunnel.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-10-06 21:43:12 +0000
committerrowanbeentje <rowan@beent.je>2010-10-06 21:43:12 +0000
commitb763c421f6fc2fc693ccbf89ffe38c64cd977ab8 (patch)
tree78f895186693fb305bff00f2ab73f2f0b36aa2b4 /Source/SPSSHTunnel.m
parentc42b7483546e0cdfa1dd82cdda1d18313e6af111 (diff)
downloadsequelpro-b763c421f6fc2fc693ccbf89ffe38c64cd977ab8.tar.gz
sequelpro-b763c421f6fc2fc693ccbf89ffe38c64cd977ab8.tar.bz2
sequelpro-b763c421f6fc2fc693ccbf89ffe38c64cd977ab8.zip
- Update SSH connections to pick up custom ports configured in SSH config files; thanks to Stefan Schüßer for this patch.
- Tweak SSH Master Mode to use the "ControlMaster auto" setting instead of -M - Update localizable strings
Diffstat (limited to 'Source/SPSSHTunnel.m')
-rw-r--r--Source/SPSSHTunnel.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index 807d507e..fd0fcb9b 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -42,7 +42,7 @@
*/
- (id) initToHost:(NSString *) theHost port:(NSInteger) thePort login:(NSString *) theLogin tunnellingToPort:(NSInteger) targetPort onHost:(NSString *) targetHost
{
- if (!theHost || !thePort || !targetPort || !targetHost) return nil;
+ if (!theHost || !targetPort || !targetHost) return nil;
self = [super init];
@@ -292,7 +292,7 @@
taskArguments = [[NSMutableArray alloc] init];
[taskArguments addObject:@"-N"]; // Tunnel only
[taskArguments addObject:@"-v"]; // Verbose mode for messages
- [taskArguments addObject:@"-M"]; // Places the ssh client into 'master' mode for connection sharing
+ [taskArguments addObject:@"-o ControlMaster=auto"]; // Support 'master' mode for connection sharing
[taskArguments addObject:@"-o ExitOnForwardFailure=yes"];
[taskArguments addObject:[NSString stringWithFormat:@"-o ConnectTimeout=%ld", (long)connectionTimeout]];
[taskArguments addObject:@"-o NumberOfPasswordPrompts=3"];
@@ -305,7 +305,9 @@
[taskArguments addObject:[NSString stringWithFormat:@"-o ServerAliveInterval=%ld", (long)ceil(keepAliveInterval)]];
[taskArguments addObject:@"-o ServerAliveCountMax=1"];
}
- [taskArguments addObject:[NSString stringWithFormat:@"-p %ld", (long)sshPort]];
+ if (sshPort) {
+ [taskArguments addObject:[NSString stringWithFormat:@"-p %ld", (long)sshPort]];
+ }
if ([sshLogin length]) {
[taskArguments addObject:[NSString stringWithFormat:@"%@@%@", sshLogin, sshHost]];
} else {