Thanks – good pickup
- stuartp
/log-level
. It should be /loglevel
.
winscp.com
, not winscp.exe
:
. 2022-04-04 10:09:25.119 --------------------------------------------------------------------------
. 2022-04-04 10:09:25.119 WinSCP Version 5.19.6 (Build 12002 2022-02-22) (OS 10.0.17763 - Windows Server 2019 Standard)
. 2022-04-04 10:09:25.119 Configuration: nul
. 2022-04-04 10:09:25.119 Log level: Normal
. 2022-04-04 10:09:25.119 Local account: CORP\stu
. 2022-04-04 10:09:25.119 Working directory: C:\Program Files (x86)\WinSCP
. 2022-04-04 10:09:25.119 Process ID: 6220
. 2022-04-04 10:09:25.119 Ancestor processes: powershell_ise, explorer, ...
. 2022-04-04 10:09:25.119 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log=D:\Telemetry\quads\Logs\poller_log_20220404100924.txt /log-level=1 /ini=nul /script=D:\Telemetry\quads\scripts\nrderad01_7100_winscp.txt
. 2022-04-04 10:09:25.119 Time zone: Current: GMT+10, Standard: GMT+10 (AUS Eastern Standard Time), DST: GMT+11 (AUS Eastern Daylight Time), DST Start: 2/10/2022, DST End: 3/04/2022
. 2022-04-04 10:09:25.119 Login time: Monday, 4 April 2022 10:09:25 AM
. 2022-04-04 10:09:25.119 --------------------------------------------------------------------------
. 2022-04-04 10:09:25.119 Script: Retrospectively logging previous script records:
< 2022-04-04 10:09:25.119 Script: Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead.
> 2022-04-04 10:09:25.119 Script: open sftp://stu:***@xx.xxx.xx.xxx/ -hostkey="ssh-rsa 2048 <snip>="
. 2022-04-04 10:09:25.119 --------------------------------------------------------------------------
. 2022-04-04 10:09:25.119 Session name: stu@xx.xxx.xx.xxx (Ad-Hoc site)
. 2022-04-04 10:09:25.119 Host name: xx.xxx.xx.xxx (Port: 22)
. 2022-04-04 10:09:25.119 User name: stu (Password: Yes, Key file: No, Passphrase: No)
. 2022-04-04 10:09:25.119 Tunnel: No
. 2022-04-04 10:09:25.119 Transfer Protocol: SFTP
. 2022-04-04 10:09:25.119 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2022-04-04 10:09:25.119 Disable Nagle: No
. 2022-04-04 10:09:25.119 Proxy: None
. 2022-04-04 10:09:25.135 Send buffer: 262144
. 2022-04-04 10:09:25.135 SSH protocol version: 2; Compression: No
. 2022-04-04 10:09:25.135 Bypass authentication: No
. 2022-04-04 10:09:25.135 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2022-04-04 10:09:25.135 GSSAPI: KEX: No; Forwarding: No; Libs: gssapi32,sspi,custom; Custom:
. 2022-04-04 10:09:25.135 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2022-04-04 10:09:25.135 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2022-04-04 10:09:25.135 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2022-04-04 10:09:25.135 Simple channel: Yes
. 2022-04-04 10:09:25.135 Return code variable: Autodetect; Lookup user groups: Auto
. 2022-04-04 10:09:25.135 Shell: default
. 2022-04-04 10:09:25.135 EOL: LF, UTF: Auto
. 2022-04-04 10:09:25.135 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2022-04-04 10:09:25.135 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2022-04-04 10:09:25.135 SFTP Bugs: Auto,Auto
. 2022-04-04 10:09:25.135 SFTP Server: default
. 2022-04-04 10:09:25.135 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2022-04-04 10:09:25.135 Cache directory changes: Yes, Permanent: Yes
. 2022-04-04 10:09:25.135 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2022-04-04 10:09:25.135 DST mode: Unix
. 2022-04-04 10:09:25.135 --------------------------------------------------------------------------
< 2022-04-04 10:09:25.135 Script: Searching for host...
. 2022-04-04 10:09:25.135 Looking up host "xx.xxx.xx.xxx" for SSH connection
. 2022-04-04 10:09:25.135 Connecting to xx.xxx.xx.xxx port 22
< 2022-04-04 10:09:25.135 Script: Connecting to host...
. 2022-04-04 10:09:25.135 We claim version: SSH-2.0-WinSCP_release_5.19.6
. 2022-04-04 10:09:25.135 Remote version: SSH-2.0-OpenSSH_4.3
. 2022-04-04 10:09:25.135 We believe remote version has SSH-2 channel request bug
. 2022-04-04 10:09:25.135 Using SSH protocol version 2
. 2022-04-04 10:09:25.135 Have a known host key of type rsa2
. 2022-04-04 10:09:25.135 Doing Diffie-Hellman group exchange
. 2022-04-04 10:09:25.135 Doing Diffie-Hellman key exchange using 2048-bit modulus and hash SHA-1 with a server-supplied group
. 2022-04-04 10:09:25.401 Server also has ssh-dss host key, but we don't know it
. 2022-04-04 10:09:25.401 Host key fingerprint is:
. 2022-04-04 10:09:25.401 ssh-rsa 2048 9e:fd:64:de:ac:45:50:7d:1a:45:3f:a4:fa:7b:02:94 <snip>=
< 2022-04-04 10:09:25.401 Script: Authenticating...
. 2022-04-04 10:09:25.401 Host key matches configured key fingerprint
. 2022-04-04 10:09:25.401 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] outbound encryption
. 2022-04-04 10:09:25.401 Initialised HMAC-SHA-1 outbound MAC algorithm
. 2022-04-04 10:09:25.401 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] inbound encryption
. 2022-04-04 10:09:25.401 Initialised HMAC-SHA-1 inbound MAC algorithm
! 2022-04-04 10:09:25.401 Using username "stu".
< 2022-04-04 10:09:25.401 Script: Using username "stu".
. 2022-04-04 10:09:25.401 Server offered these authentication methods: publickey,gssapi-with-mic,password
. 2022-04-04 10:09:25.401 Using SSPI from SECUR32.DLL
. 2022-04-04 10:09:25.401 Trying gssapi-with-mic...
. 2022-04-04 10:09:25.401 Attempting GSSAPI authentication
. 2022-04-04 10:09:25.416 GSSAPI authentication request refused
. 2022-04-04 10:09:25.416 Server offered these authentication methods: publickey,gssapi-with-mic,password
. 2022-04-04 10:09:25.416 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2022-04-04 10:09:25.416 Using stored password.
< 2022-04-04 10:09:25.416 Script: Authenticating with pre-entered password.
. 2022-04-04 10:09:25.416 Sent password
. 2022-04-04 10:09:25.416 Access granted
. 2022-04-04 10:09:25.416 Opening main session channel
. 2022-04-04 10:09:25.416 Opened main channel
. 2022-04-04 10:09:25.416 Started a shell/command
< 2022-04-04 10:09:25.416 Script: Authenticated.
. 2022-04-04 10:09:25.416 --------------------------------------------------------------------------
. 2022-04-04 10:09:25.416 Using SFTP protocol.
. 2022-04-04 10:09:25.416 Doing startup conversation with host.
< 2022-04-04 10:09:25.416 Script: Starting the session...
> 2022-04-04 10:09:25.416 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2022-04-04 10:09:25.432 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2022-04-04 10:09:25.432 SFTP version 3 negotiated.
. 2022-04-04 10:09:25.432 We believe the server has signed timestamps bug
. 2022-04-04 10:09:25.432 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2022-04-04 10:09:25.432 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2022-04-04 10:09:25.432 Getting current directory name.
. 2022-04-04 10:09:25.432 Getting real path for '.'
> 2022-04-04 10:09:25.432 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2022-04-04 10:09:25.432 Type: SSH_FXP_NAME, Size: 47, Number: 16
. 2022-04-04 10:09:25.432 Real path is '/home/stu'
. 2022-04-04 10:09:25.432 Startup conversation with host finished.
< 2022-04-04 10:09:25.432 Script: Session started.
< 2022-04-04 10:09:25.432 Script: Active session: [1] stu@xx.xxx.xx.xxx
. 2022-04-04 10:09:25.432 Script: Exit code: 1
. 2022-04-04 10:09:25.432 Closing connection.
. 2022-04-04 10:09:25.432 Sending special code: 1
. 2022-04-04 10:09:25.432 Session sent command exit status 0
. 2022-04-04 10:09:25.432 Main session channel closed
. 2022-04-04 10:09:25.432 All channels closed
ls
– the script is failing.
. 2022-04-04 10:09:25.432 Real path is '/home/stu'
. 2022-04-04 10:09:25.432 Startup conversation with host finished.
< 2022-04-04 10:09:25.432 Script: Session started.
< 2022-04-04 10:09:25.432 Script: Active session: [1] stu@<redacted>
. 2022-04-04 10:09:25.432 Script: Exit code: 1
. 2022-04-04 10:09:25.432 Closing connection.
. 2022-04-04 10:09:25.432 Sending special code: 1
. 2022-04-04 10:09:25.432 Session sent command exit status 0
. 2022-04-04 10:09:25.432 Main session channel closed
. 2022-04-04 10:09:25.432 All channels closed