From 7770d186e53333567f4060ce096fc0a24476dfb3 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 28 Nov 2010 17:22:50 +0000 Subject: [PATCH] Append -N option to plink command line. Avoids starting a shell on the remote system, and probably heals immediately exiting plink process in cases where the user is not allowed to start a shell. Discussed in issue #2236. --- source/mysql_connection.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/mysql_connection.pas b/source/mysql_connection.pas index 0b197e6e..4725ddd3 100644 --- a/source/mysql_connection.pas +++ b/source/mysql_connection.pas @@ -539,7 +539,7 @@ begin PlinkCmd := PlinkCmd + ' -P ' + IntToStr(FParameters.SSHPort); if FParameters.SSHPrivateKey <> '' then PlinkCmd := PlinkCmd + ' -i "' + FParameters.SSHPrivateKey + '"'; - PlinkCmd := PlinkCmd + ' -L ' + IntToStr(FParameters.SSHLocalPort) + ':' + FParameters.Hostname + ':' + IntToStr(FParameters.Port); + PlinkCmd := PlinkCmd + ' -N -L ' + IntToStr(FParameters.SSHLocalPort) + ':' + FParameters.Hostname + ':' + IntToStr(FParameters.Port); Log(lcInfo, 'Attempt to create plink.exe process, waiting '+FormatNumber(FParameters.SSHTimeout)+'s for response ...'); // Create plink.exe process FillChar(FPlinkProcInfo, SizeOf(TProcessInformation), 0);