mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user