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

Advertisement

Jace
Guest

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

To specify commands on the command-line, you have to use:
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:
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)

Reply with quote

Advertisement

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

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

Jace wrote:

I tried this, for example:
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

Reply with quote

Advertisement

You can post new topics in this forum