Re: WinSCP.com actions being duplicated?
You are opening SFTP session. The SFTP protocol does not allow you to execute shell commands. So WinSCP opens secondary shell session to execute your command.
If the only purpose of your script is to execute the command (i.e. no file transfer), open a shell/SCP session directly by using
Ideally, you should use
If the only purpose of your script is to execute the command (i.e. no file transfer), open a shell/SCP session directly by using
scp://
protocol prefix.
Ideally, you should use
open
command. And make sure you understand that you give up any security by using -hostkey=*
.
"C:\Repository\support\tools\WinSCP\WinSCP.com" /command "open -hostkey=""real hostkey"" scp://<username>@<servername> -privatekey=C:\Repository\support\tools\WinSCP\putty_ssh.ppk" "call pwd" "exit"