Posted: 2011-12-19 08:44
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"""
Location: Prague, Czechia
Try adding /log=logfile parameter as the very first one and post the generated log.
You can post new topics in this forum
And it's free!