Topic "Unable to call from external program."

Author Message



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 /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"""

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26857
Location: Prague, Czechia
Try adding /log=logfile parameter as the very first one and post the generated log.
Martin Prikryl

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License