I'll be able to capture a session log soon, but for now the steps are
I store my connections in KeePass and use the Override URL setting to open WinSCP. Here is that command.
cmd://"WinSCP.exe" /ini="%USERPROFILE%\Documents\Config Files\WinSCP\config.ini" "scp://{USERNAME}:{PASSWORD}@{URL}" -rawsettings ConsiderDST=2
Once connected I click the button to open a PuTTY session.
In the GUI (Explorer style, not Commander) I select a directory and view contents
In PuTTY I
rm -r
that directory.
(All of this made sense in context, this is just the pared down version.)
Then in WinSCP I try to click on a directory other than the one I'm in (because it doesn't exist any more)
I tried clicking on the home directory.
I tried going up a directory using the up button in the GUI
I tried clicking on the a different directory.
I tried clicking on the home directory again.
Oh, I found my log file...
. 2023-10-20 17:44:55.262 WinSCP Version 6.1.2 (Build 13797 2023-09-19) (OS 10.0.19045 – Windows 10 Enterprise)
. 2023-10-20 17:44:55.264 Log level: Normal
. 2023-10-20 17:44:55.264 Working directory: D:\Program Files\KeePass Password Safe 2
. 2023-10-20 17:44:55.264 Process ID: 20888
. 2023-10-20 17:44:55.273 Ancestor processes: KeePass, explorer, ...
. 2023-10-20 17:44:55.273 Command-line: "D:\Program Files (x86)\WinSCP\WinSCP.exe" /ini="C:\Users\USERNAME\Documents\Config Files\WinSCP\config.ini" scp://USER:***@HOST -rawsettings ConsiderDST=2
. 2023-10-20 17:44:55.274 Time zone: Current: GMT-5, Standard: GMT-6 (Central Standard Time), DST: GMT-5 (Central Daylight Time), DST Start: 3/12/2023, DST End: 11/5/2023
. 2023-10-20 17:44:55.274 Login time: Friday, October 20, 2023 5:44:55 PM
. 2023-10-20 17:44:55.274 Tunnel: No
. 2023-10-20 17:44:55.274 Transfer Protocol: SCP
. 2023-10-20 17:44:55.274 Ping type: Off, Ping interval: 60 sec; Timeout: 15 sec
. 2023-10-20 17:44:55.274 Disable Nagle: Yes
. 2023-10-20 17:44:55.274 Proxy: None
. 2023-10-20 17:44:55.274 Send buffer: 262144
. 2023-10-20 17:44:55.274 Compression: No
. 2023-10-20 17:44:55.274 Bypass authentication: No
. 2023-10-20 17:44:55.274 Try agent: Yes; Agent forwarding: No; KI: Yes; GSSAPI: Yes
. 2023-10-20 17:44:55.274 GSSAPI: KEX: No; Forwarding: No; Libs: gssapi32,sspi,custom; Custom:
. 2023-10-20 17:44:55.274 Ciphers: aes,blowfish,3des,chacha20,aesgcm,WARN,des,arcfour; Ssh2DES: No
. 2023-10-20 17:44:55.274 KEX: ntru-curve25519,ecdh,dh-gex-sha1,dh-group18-sha512,dh-group17-sha512,dh-group16-sha512,dh-group15-sha512,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2023-10-20 17:44:55.274 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2023-10-20 17:44:55.274 Simple channel: Yes
. 2023-10-20 17:44:55.274 Return code variable: Autodetect; Lookup user groups: Auto
. 2023-10-20 17:44:55.274 Shell: default
. 2023-10-20 17:44:55.274 EOL: LF, UTF: Auto
. 2023-10-20 17:44:55.274 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2023-10-20 17:44:55.274 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2023-10-20 17:44:55.274 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2023-10-20 17:44:55.274 Cache directory changes: Yes, Permanent: Yes
. 2023-10-20 17:44:55.274 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2023-10-20 17:44:55.274 DST mode: Keep;Timezone offset: 0h 0m
. 2023-10-20 17:44:55.274 --------------------------------------------------------------------------
. 2023-10-20 17:44:55.781 We claim version: SSH-2.0-WinSCP_release_6.1.2
. 2023-10-20 17:44:55.781 Connected to IP ADDRESS
. 2023-10-20 17:44:55.827 Remote version: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.7
. 2023-10-20 17:44:55.827 We believe remote version has SSH-2 RSA/SHA-2/certificate userauth bug
. 2023-10-20 17:44:55.827 Using SSH protocol version 2
. 2023-10-20 17:44:55.831 Have a known host key of type ssh-ed25519
. 2023-10-20 17:44:55.888 Doing ECDH key exchange with curve Curve25519, using hash SHA-256
. 2023-10-20 17:44:55.979 Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256/ssh-rsa host keys, but we don't know any of them
. 2023-10-20 17:44:55.979 Host key fingerprint is:
. 2023-10-20 17:44:55.979 ssh-ed25519 255 SHA256:KEY FINGERPRINT HERE
. 2023-10-20 17:44:55.988 Host key matches cached key
. 2023-10-20 17:44:55.989 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] outbound encryption
. 2023-10-20 17:44:55.989 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2023-10-20 17:44:55.989 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] inbound encryption
. 2023-10-20 17:44:55.989 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2023-10-20 17:44:56.033 Using username "USER".
. 2023-10-20 17:44:56.093 Server offered these authentication methods: publickey,password
. 2023-10-20 17:44:56.093 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2023-10-20 17:44:56.093 Using stored password.
. 2023-10-20 17:44:56.116 Sent password
. 2023-10-20 17:44:56.163 Access granted
. 2023-10-20 17:44:56.164 Opening main session channel
. 2023-10-20 17:44:56.285 Opened main channel
. 2023-10-20 17:44:56.330 Started a shell/command
. 2023-10-20 17:44:56.371 --------------------------------------------------------------------------
. 2023-10-20 17:44:56.372 Using SCP protocol.
. 2023-10-20 17:44:56.373 Doing startup conversation with host.
. 2023-10-20 17:44:56.385 Skipping host startup message (if any).
> 2023-10-20 17:44:56.385 echo "WinSCP: this is end-of-file:0"
< 2023-10-20 17:44:56.385
< 2023-10-20 17:44:56.385 SERVER MOTD HERE
< 2023-10-20 17:44:56.385
< 2023-10-20 17:44:56.426 WinSCP: this is end-of-file:0
. 2023-10-20 17:44:56.426 Detecting variable containing return code of last command.
. 2023-10-20 17:44:56.426 Trying "$status".
> 2023-10-20 17:44:56.426 echo "$status" ; echo "WinSCP: this is end-of-file:0"
< 2023-10-20 17:44:56.466 WinSCP: this is end-of-file:0
. 2023-10-20 17:44:56.466 The response is not numerical exit code
. 2023-10-20 17:44:56.467 Trying "$?".
> 2023-10-20 17:44:56.467 echo "$?" ; echo "WinSCP: this is end-of-file:0"
< 2023-10-20 17:44:56.507 0
< 2023-10-20 17:44:56.507 WinSCP: this is end-of-file:0
. 2023-10-20 17:44:56.507 Return code variable "$?" selected.
> 2023-10-20 17:44:56.507 printenv LANG ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:56.569 WinSCP: this is end-of-file:1
. 2023-10-20 17:44:56.569 We will not use UTF-8
. 2023-10-20 17:44:56.569 Clearing all aliases.
> 2023-10-20 17:44:56.569 unalias "ls" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:56.610 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:56.610 unalias "echo" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.651 -bash: line 6: unalias: echo: not found
< 2023-10-20 17:44:56.652 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.652 unalias "pwd" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.694 -bash: line 7: unalias: pwd: not found
< 2023-10-20 17:44:56.694 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.694 unalias "cd" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.736 -bash: line 8: unalias: cd: not found
< 2023-10-20 17:44:56.736 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.736 unalias "groups" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.779 -bash: line 9: unalias: groups: not found
< 2023-10-20 17:44:56.780 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.780 unalias "scp" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.819 -bash: line 10: unalias: scp: not found
< 2023-10-20 17:44:56.820 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.820 unalias "rm" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.860 -bash: line 11: unalias: rm: not found
< 2023-10-20 17:44:56.861 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.861 unalias "mv" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.903 -bash: line 12: unalias: mv: not found
< 2023-10-20 17:44:56.903 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.903 unalias "mkdir" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.944 -bash: line 13: unalias: mkdir: not found
< 2023-10-20 17:44:56.945 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.945 unalias "chmod" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:56.986 -bash: line 14: unalias: chmod: not found
< 2023-10-20 17:44:56.986 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:56.986 unalias "chgrp" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.026 -bash: line 15: unalias: chgrp: not found
< 2023-10-20 17:44:57.028 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:57.028 unalias "chown" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.069 -bash: line 16: unalias: chown: not found
< 2023-10-20 17:44:57.069 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:57.069 unalias "unset" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.109 -bash: line 17: unalias: unset: not found
< 2023-10-20 17:44:57.110 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:57.110 unalias "unalias" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.160 -bash: line 18: unalias: unalias: not found
< 2023-10-20 17:44:57.160 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:57.160 unalias "ln" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.201 -bash: line 19: unalias: ln: not found
< 2023-10-20 17:44:57.201 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:57.201 unalias "cp" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.241 -bash: line 20: unalias: cp: not found
< 2023-10-20 17:44:57.241 WinSCP: this is end-of-file:1
> 2023-10-20 17:44:57.241 unalias "printenv" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 17:44:57.282 -bash: line 21: unalias: printenv: not found
< 2023-10-20 17:44:57.282 WinSCP: this is end-of-file:1
. 2023-10-20 17:44:57.282 Clearing national user variables.
> 2023-10-20 17:44:57.282 unset "LANG" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.324 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.324 unset "LANGUAGE" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.366 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.366 unset "LC_CTYPE" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.406 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.406 unset "LC_COLLATE" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.448 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.448 unset "LC_MONETARY" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.488 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.488 unset "LC_NUMERIC" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.528 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.529 unset "LC_TIME" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.573 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.573 unset "LC_MESSAGES" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.615 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.615 unset "LC_ALL" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.657 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.657 unset "HUMAN_BLOCKS" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.697 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.697 unset "BLOCK_SIZE" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.741 WinSCP: this is end-of-file:0
> 2023-10-20 17:44:57.741 unset "LS_BLOCK_SIZE" ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.781 WinSCP: this is end-of-file:0
. 2023-10-20 17:44:57.781 Looking up groups and users.
> 2023-10-20 17:44:57.781 groups ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.833 GROUPID
< 2023-10-20 17:44:57.833 WinSCP: this is end-of-file:0
. 2023-10-20 17:44:57.833 Following groups found:
. 2023-10-20 17:44:57.833 "GROUPID" [0]
. 2023-10-20 17:44:57.833 Following membership found:
. 2023-10-20 17:44:57.833 "GROUPID" [0]
. 2023-10-20 17:44:57.833 No users found.
. 2023-10-20 17:44:57.833 Getting current directory name.
> 2023-10-20 17:44:57.833 pwd ; echo "WinSCP: this is end-of-file:$?"
< 2023-10-20 17:44:57.876 /home/USER
< 2023-10-20 17:44:57.876 WinSCP: this is end-of-file:0
. 2023-10-20 17:44:57.939 Listing current directory.
> 2023-10-20 17:44:57.939 ls -la --full-time ; echo "WinSCP: this is end-of-file:$?"
HUNDREDS OF LINES DELETED
. 2023-10-20 20:30:53.913 Cached directory change via "/home/USERNAME/PATH/wfdemo" to "/home/USERNAME/PATH/wfdemo".
. 2023-10-20 20:30:53.913 Getting current directory name.
. 2023-10-20 20:30:53.934 Directory content loaded from cache.
. 2023-10-20 20:31:03.304 Cached directory change via "/home/USERNAME/PATH/wfdemo.orig" to "/home/USERNAME/PATH/wfdemo.orig".
. 2023-10-20 20:31:03.304 Getting current directory name.
. 2023-10-20 20:31:03.331 Directory content loaded from cache.
. 2023-10-20 20:31:04.567 Cached directory change via "/home/USERNAME/PATH/wfdemo" to "/home/USERNAME/PATH/wfdemo".
. 2023-10-20 20:31:04.567 Getting current directory name.
. 2023-10-20 20:31:04.592 Directory content loaded from cache.
. 2023-10-20 20:33:01.598 Changing directory to "/home/USERNAME/PATH".
. 2023-10-20 20:33:01.599 Locating to cached directory "/home/USERNAME/PATH/wfdemo".
> 2023-10-20 20:33:01.599 cd "/home/USERNAME/PATH/wfdemo" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 20:33:01.642 -bash: line 1275: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
< 2023-10-20 20:33:01.642 WinSCP: this is end-of-file:1
* 2023-10-20 20:33:01.643 (ECommand) Error changing directory to '/home/USERNAME/PATH'.
* 2023-10-20 20:33:01.643 Command 'cd "/home/USERNAME/PATH/wfdemo"'
* 2023-10-20 20:33:01.643 failed with return code 1 and the following error message.
* 2023-10-20 20:33:01.643 -bash: line 1275: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
. 2023-10-20 20:33:08.945 Changing directory to "..".
. 2023-10-20 20:33:08.956 Locating to cached directory "/home/USERNAME/PATH/wfdemo".
> 2023-10-20 20:33:08.956 cd "/home/USERNAME/PATH/wfdemo" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 20:33:09.003 -bash: line 1276: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
< 2023-10-20 20:33:09.003 WinSCP: this is end-of-file:1
* 2023-10-20 20:33:09.005 (ECommand) Error changing directory to '..'.
* 2023-10-20 20:33:09.005 Command 'cd "/home/USERNAME/PATH/wfdemo"'
* 2023-10-20 20:33:09.005 failed with return code 1 and the following error message.
* 2023-10-20 20:33:09.005 -bash: line 1276: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
. 2023-10-20 20:33:15.151 Changing directory to "/home/USERNAME/PATH/silverio".
. 2023-10-20 20:33:15.152 Locating to cached directory "/home/USERNAME/PATH/wfdemo".
> 2023-10-20 20:33:15.152 cd "/home/USERNAME/PATH/wfdemo" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 20:33:15.204 -bash: line 1277: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
< 2023-10-20 20:33:15.204 WinSCP: this is end-of-file:1
* 2023-10-20 20:33:15.205 (ECommand) Error changing directory to '/home/USERNAME/PATH/silverio'.
* 2023-10-20 20:33:15.205 Command 'cd "/home/USERNAME/PATH/wfdemo"'
* 2023-10-20 20:33:15.205 failed with return code 1 and the following error message.
* 2023-10-20 20:33:15.205 -bash: line 1277: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
. 2023-10-20 20:33:35.735 Changing directory to "/home/USERNAME/PATH".
. 2023-10-20 20:33:35.736 Locating to cached directory "/home/USERNAME/PATH/wfdemo".
> 2023-10-20 20:33:35.736 cd "/home/USERNAME/PATH/wfdemo" ; echo "WinSCP: this is end-of-file:$?"
! 2023-10-20 20:33:35.779 -bash: line 1278: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
< 2023-10-20 20:33:35.779 WinSCP: this is end-of-file:1
* 2023-10-20 20:33:35.781 (ECommand) Error changing directory to '/home/USERNAME/PATH'.
* 2023-10-20 20:33:35.781 Command 'cd "/home/USERNAME/PATH/wfdemo"'
* 2023-10-20 20:33:35.781 failed with return code 1 and the following error message.
* 2023-10-20 20:33:35.781 -bash: line 1278: cd: /home/USERNAME/PATH/wfdemo: No such file or directory
. 2023-10-20 20:36:42.075 Closing connection.
. 2023-10-20 20:36:42.075 Sending special code: 1
. 2023-10-20 20:36:42.118 Session sent command exit status 0
. 2023-10-20 20:36:42.118 Main session channel closed
. 2023-10-20 20:36:42.119 All channels closed
. 2023-10-20 20:36:42.120 [Background 1] Closing connection.
. 2023-10-20 20:36:42.120 [Background 1] Sending special code: 1
. 2023-10-20 20:36:42.162 [Background 1] Session sent command exit status 0
. 2023-10-20 20:36:42.162 [Background 1] Main session channel closed
. 2023-10-20 20:36:42.163 [Background 1] All channels closed