Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Unable to call WinSCP.com from external program.

Try adding /log=logfile parameter as the very first one and post the generated log.
Iskren

Unable to call WinSCP.com from external program.

Greetings!

I am using WinSCP 4.3.5 (also tried v.5.0.5 beta) to retrieve some files via SCP from various embedded devices, running a dropbear ssh server (supports only the SCP protocol) on Windows 7 SP1 x86_64.

When I call WinSCP.com /command "open scp://user:password@device_ip/path -hostkey=""ssh-rsa 1024 rest_of_the_key_goes_here""" "get /path/to/file" "exit" it works as intended. I'm writing a GUI program using the Qt toolkit that searches a database to get the user, password, ip and the hostkey to build and execute the command. The problem is whenever I try to call it, the output of WinSCP is the following:
Searching for host...

Network error: Network is unreachable
Unknown command '\open'.
Unknown command 'scp://root@host/etc/'.


I tried to debug, since I don't know if my program is passing the correct arguments, so I wrote a simple C++ program that outputs the arguments passed to it and the output is:
Argument count: 2

Parameters: /command "open scp://root@host/etc/ -hostkey=""ssh-rsa 1040 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"""


Thanks.