TunnelPasswordPlain not working in PowerShell script
My WinSCP GUI works well for manfully inputting both Tunnel Username/password and access username/password. But the generated PowerShell script doesn't work. I added password into the script file. But it seems the program doesn't get Tunnel password, it's still say (Password: No).
See below log:
I did use
Any advise is helpful and appreciate.
See below log:
. 2021-10-21 09:22:24.189 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=5.19.2 /consoleinstance=_21264_257 "/log=C:\temp\log\WinSCP.log" "/ini=nul" "/command" "open scp://123_scp:***@142.123.001.123/ -hostkey=""ssh-rsa 2048 Y3P6mwpIMDu64ngZsiqOe9VVVK4vmnCubTg/T3YZIXE="" -rawsettings Tunnel=1 TunnelHostName=""142.001.001.12"" TunnelHostKey=""ssh-ed25519 255 +8C0z8OHdWLr0CM/o7VwV5jQ64Hzdck+rhTyPTy9bd0="" TunnelUserName=""q4mh8k9"" TunnelPasswordPlain=***" "lcd C:\Steven\Projects\SCPC_Output" "cd /home/123_scp/10_Seedfile_Oct_2021" "put CSPC_Adding_List.csv" "exit"
TunnelPasswordPlain
, but the log says the password is No:
. 2021-10-21 09:22:24.189 Tunnel: User name: username123(Password: No, Key file: No) . 2021-10-21 09:22:24.352 [Tunnel] Host key matches configured key fingerprint . 2021-10-21 09:22:24.352 [Tunnel] Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] outbound encryption . 2021-10-21 09:22:24.352 [Tunnel] Initialised HMAC-SHA-256 outbound MAC algorithm . 2021-10-21 09:22:24.352 [Tunnel] Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] inbound encryption . 2021-10-21 09:22:24.352 [Tunnel] Initialised HMAC-SHA-256 inbound MAC algorithm ! 2021-10-21 09:22:24.370 [Tunnel] Using username "username123". < 2021-10-21 09:22:24.370 Script: Using username "username123". ! 2021-10-21 09:22:24.393 [Tunnel] SECURITY NOTICE: ! 2021-10-21 09:22:24.393 [Tunnel] Unauthorized use is prohibited. Use of this private computer system is your consent to being recorded and monitored. We reserve the right to seek all remedies for unauthorized use. Evidence of suspected illegal use may be given to law enforcement. . 2021-10-21 09:22:24.393 [Tunnel] Server offered these authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password . 2021-10-21 09:22:24.393 [Tunnel] Using SSPI from SECUR32.DLL . 2021-10-21 09:22:24.393 [Tunnel] Trying gssapi-with-mic... . 2021-10-21 09:22:24.393 [Tunnel] Attempting GSSAPI authentication . 2021-10-21 09:22:24.411 [Tunnel] GSSAPI authentication request refused . 2021-10-21 09:22:24.411 [Tunnel] Server offered these authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password . 2021-10-21 09:22:24.411 [Tunnel] Prompt (password, "SSH password", <no instructions>, "&Password: ")
Last edited by steve_wang on 2021-10-21 16:48; edited 1 time in total