Re: Connecting with .ppk private key to a SFTP
How can we connect using private key
It's answered above already.
Also, nowadays, WinSCP GUI can generate a script template for you:
https://winscp.net/eng/docs/ui_generateurl#script
How can we connect using private key
-privatekey=
winscp.com /command "open user@sftp_srv" /privatekey=c:\private.ppk
or winscp.exe /console....
work perfectly.
winscp.com /script=script_file.txt
and in the script_file.txt
I specify the private key
open user@sftp_srv /privatekey=.....
This does not work and the error is "Too many parameters with open". Apparently the /privatekey
switch here is the problem because without it, the script starts to open the session - of course it fails.
/privatekey
within a script file ?
-privatekey=
switch of open
command:
/privatekey=
command-line parameter: