Topic "using open command with -hostkey="xxx" on the commandline?"

Author Message
Jace

Guest


To specify commands on the command-line, you have to use:
Code:
winscp /command "xxx" "yyy" etc

with xxx, yyy, etc being the commands you want to execute.

Now, I want to put an open command on the command-line, including the -hostkey="xxx" option. Problem is, both the hostkey (which contains spaces), as well as the whole open command, need to be placed in quotes (").

I tried this, for example:
Code:
winscp /command "open sftp://name:pasw@domain.com -hostkey=""ssh-rsa 2048 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff"""

and several other variants, but it doesn't work.

Is there any way to work around this? (besides demanding that the fingerprint is stored in the .ini file)
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Jace wrote:
I tried this, for example:
Code:
winscp /command "open sftp://name:pasw@domain.com -hostkey=""ssh-rsa 2048 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff"""

and several other variants, but it doesn't work.

The above syntax is correct. Are you using the latest version of WinSCP?
_________________
Martin Prikryl
Jace

Guest


I think so, version 4.2.7 build 758 ?
Guest




(edit) sorry, my bad, apparently I made a mistake before, just tried again and it seems to work! Embarassed
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