0

How to use WinSCP or any other program (from command-line) to download files from SFTP with authorization key?

This is for Windows versions 10 and 11. I am trying to download files from command prompt (cmd.exe) without using the graphical user interface. For example, using a batch file to download the files. The SFTP uses basic string key.

1
  • What research have you done and what have you tried? Sep 11 at 18:49

1 Answer 1

1

In WinSCP scripting, use -privatekey switch of the open command to specify the key to authenticate with.

open -privatekey=mykey.ppk sftp://use[email protected]
get /remote/path/file C:\local\path\file
exit

Not the answer you're looking for? Browse other questions tagged .