Unable to call WinSCP.com from external program.

Advertisement

Iskren
Guest

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

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

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

Reply with quote

Advertisement

You can post new topics in this forum