Environment
Reflection for Secure IT Client for Windows 7.2 SP 2 (7.2.2190) and higher
Situation
The –q “quiet” switch does not suppress the "Connect" and “Connection closed to" messages after ssh executes a remote command.
Example:
From Windows command line, type:
Output:
Connected.
File1.txt
File2.txt
Connection closed to <myhost>
Example:
From Windows command line, type:
ssh –q <user>@<myhost> "ls"
Output:
Connected.
File1.txt
File2.txt
Connection closed to <myhost>
Resolution
Workaround:
If command is used within a script and outputs are sent to a file, adding the “-f” switch will suppress the two message in the output file.
Example:
If command is used within a script and outputs are sent to a file, adding the “-f” switch will suppress the two message in the output file.
Example:
ssh -q -f <user>@<myhost> "ls" >C:\output\output.txt