I have a server that I connect to via a tunnel regularly. Here is the open command as generated inside WinSCP for scripting:
open sftp://lewiske:zxcv%2F456@10.128.90.20:3389/ -rawsettings Tunnel=1 TunnelHostName="172.26.170.21" TunnelUserName="kris.ctr.lewis" TunnelPasswordPlain="A10THlt-!)"
Using commander GUI, connection opens and works properly, no issues.
When I attempt to use that open command in /console, I get this:
(fingerprint slightly altered)Opening tunnel...
Searching for host...
Connecting to host...
Expected host key was not configured, use -hostkey switch.
Host key fingerprint is ecdsa-sha2-nistp256 256 KmlymX4521gtpAaOhSrz4UY9CAEO+JNiAFTCQ/XqbUN=.
when I alter the open command to include the hostkey as instructed, using this open line:
open sftp://lewiske:email@example.com:3389/ -hostkey="ecdsa-sha2-nistp256 256 KmlymX4521gtpAaOhSrz4UY9CAEO+JNiAFTCQ/XqbUN=" Tunnel=1 TunnelHostName="172.26.170.21" TunnelUserName="kris.ctr.lewis" TunnelPasswordPlain="xxx"
Help?Too many parameters for command 'open'.
Log attached (with some added data) though it does not seem useful. It gave no indication why the script failed - I found out in /console
(this server, the reasons for my connecting to it, and the data to be transferred are all Safety-of-Flight. I'm an Air Traffic Systems Field Engineer, the system is FAA). I can do what I need to do in GUI, but running scripts on the remote host in GUI mode is annoying - I shift to Mobaterm for that. I'd rather script the whole process.)