Generated script file not work (Expected host key was not configured)
Hi, I can manually transfer files through WinSCP GUI, but when I generated the Power Shell script, the script file doesn't work.
The below is major part of the script file (I added password into it):
The below is the log file:
Any advise?
The below is major part of the script file (I added password into it):
"open scp://username2:password2@142.245.206.123/ -hostkey=`"`"ssh-rsa 2048 Y3P6mwpIMDu64ngZsiqOe9VVVK4vmnCubTg/T3YZIXE=`"`" -rawsettings Tunnel=1 TunnelHostName=`"`"142.245.207.12`"`" TunnelUserName=`"`"username1`"`" TunnelPasswordPlain=`"`"password1`"`"" `
< 2021-10-20 16:33:12.986 Script: Opening tunnel... . 2021-10-20 16:33:12.986 Opening tunnel. . 2021-10-20 16:33:12.987 Autoselected tunnel local port number 50045 < 2021-10-20 16:33:12.987 Script: Searching for host... . 2021-10-20 16:33:12.988 [Tunnel] Looking up host "142.245.207.84" for SSH connection . 2021-10-20 16:33:12.988 [Tunnel] Connecting to 142.245.207.84 port 22 < 2021-10-20 16:33:13.006 Script: Connecting to host... . 2021-10-20 16:33:13.006 [Tunnel] We claim version: SSH-2.0-WinSCP_release_5.19.2 . 2021-10-20 16:33:13.034 [Tunnel] Remote version: SSH-2.0-OpenSSH_7.4 . 2021-10-20 16:33:13.034 [Tunnel] Using SSH protocol version 2 . 2021-10-20 16:33:13.057 [Tunnel] Doing ECDH key exchange with curve Curve25519 and hash SHA-256 . 2021-10-20 16:33:13.143 [Tunnel] Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them . 2021-10-20 16:33:13.144 [Tunnel] Host key fingerprint is: . 2021-10-20 16:33:13.144 [Tunnel] ssh-ed25519 255 0b:4c:48:60:dc:82:05:c3:74:0f:86:89:e2:e4:5a:e9 +8C0z8OHdWLr0CM/o7VwV5jQ64Hzdck+rhTyPTy9bd0= < 2021-10-20 16:33:13.144 Script: Authenticating... . 2021-10-20 16:33:13.144 Error opening tunnel. . 2021-10-20 16:33:13.144 [Tunnel] Closing connection. < 2021-10-20 16:33:13.145 Script: Expected host key was not configured, use -hostkey switch. < 2021-10-20 16:33:13.145 Host key fingerprint is ssh-ed25519 255 +8C0z8OHdWLr0CM/o7VwV5jQ64Hzdck+rhTyPTy9bd0=. < 2021-10-20 16:33:13.145 Authentication failed.