Fixed
Just upgraded the version from V5.13 to V5.17, it works well. Thanks. (Sorry I don't have the admin role on the dev environment to upgrade version)
TunnelPasswordPlain
in all kinds of scripts.
/loglevel=*
. That might help you with debugging the problem.
PS C:\temp\script> .\Transfer_Files.ps1
Opening tunnel...
Searching for host...
Connecting to host...
Authenticating...
Using username "username123".
Authenticating tunnel through 142.245.207.12
Password:
Authenticated.
Connecting through tunnel...
Searching for host...
Connecting to host...
Authenticating...
Using username "123_scp".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] 123_scp@142.245.206.141
C:\Steven\Projects\SCPC_Output
/home/123_scp/10_Seedfile_Oct_2021
CSPC_Adding_List.csv | 5 KB | 0.0 KB/s | binary | 100%
Success
PS C:\temp\script>
. 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: ")