Topic "Unable to call WinSCP.com from external program."

Author Message
Iskren

Guest


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:
Code:
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:
Code:
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Try adding /log=logfile parameter as the very first one and post the generated log.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License