Remember password for current session only

Advertisement

jsherk
Joined:
Posts:
35
Location:
United States

Remember password for current session only

I do not store my passwords, so whenever I start up WinSCP and choose a server to connect with, it will always ask me for my password.

If the server disconnects me though, I have to re-enter my password to re-connect.

I would like the option of it remembering my password for the current seesion, until I close WinSCP. This way I can enter it once when I start up, but I won't have to enter it again it I get disconnected.

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,552
Location:
Prague, Czechia

Re: Remember password for current session only

I'll consider it. For now, you can use Edit button to load the session to Login dialog, enter password and click Login.

Reply with quote

jsherk
Joined:
Posts:
35
Location:
United States

THanks for consideration.

I do not want to store password under EDIT ... when I startup winscp I want it to always ask for password the first time. And then it would remember it only for as long as winscp is running. Once winscp shutsdown, then it would require you to enter it again when it starts back up.

Thanks

Reply with quote

jsherk
Joined:
Posts:
35
Location:
United States

I just thought of another good use case for this feature...

When I am logged in via SFTP and I want to run a command that requires SCP, it currently asks me to enter my password again... if password was stored, then it would just connect and run the command without asking me.

Thanks

Reply with quote

glauber
Joined:
Posts:
7
Location:
Chicago Area, USA

Filezilla does this (saves passwords in memory until the application is terminated). I agree it's a nice feature.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,552
Location:
Prague, Czechia

jsherk wrote:

I do not want to store password under EDIT ... when I startup winscp I want it to always ask for password the first time. And then it would remember it only for as long as winscp is running. Once winscp shutsdown, then it would require you to enter it again when it starts back up.
That's exactly what it would do. Give it a try.

Reply with quote

jsherk
Joined:
Posts:
35
Location:
United States

Ah yes... you are right! I had (wrongly) assumed that entering your password on the Edit screen would save it permanently!

My only request now, is an option so that when you click Edit that it defaults in the Password field and not the Host Name field.

Thanks

Reply with quote

martin
Site Admin
martin avatar

jsherk wrote:

My only request now, is an option so that when you click Edit that it defaults in the Password field and not the Host Name field.
I do not understand. Please try to explain it again.

Reply with quote

jsherk
Joined:
Posts:
35
Location:
United States

Ok..

Normal login requires that I do the following:
-Double-click the desired stored session.
-Enter my password.
This is a very quick and easy login! But the problem is that it does not remember my password if I am disconnected and it will also require me to re-enter my password if I try to execute a command that requires SCP.

Login via the EDIT button requires:
-Single click the desired stored session.
-Move mouse over to Edit button and click Edit button.
-Move mouse over the Password field and click to focus on Password field.
-Enter my Password.
This method solves the problem mentioned above, but it requires a lot more mouse movement and clicks for the initial login.

So I guess I need to change my request back to my original request again ...
When I double-click my stored session and it immediately asks for my password, I would like to have an option that allows this method of login to remember my password, just like clicking the Edit button method does.

See screen shot of idea here, where it says "Remember Password for entire session":
<invalid hyperlink removed by admin>

Let me know if I am making sense!

Thanks

Reply with quote

Advertisement

snovotill
Joined:
Posts:
2

In WinSCP 5.17.10 the REMEMBER PASSWORD FOR DURATION OF SESSION feature fails whenever AUTOMATICALLY RECONNECT SESSION IF IT BREAKS WHILE IDLE times out. This happens when the remote computer reboots because that generally exceeds the initial timeout and short time-outs are desired.

After the time out, WinSCP does indeed retry but these subsequent attempts do not remember the password. Something is causing the password to drop out as soon as the first attempt fails. Compare to how KiTTY implements the Remember Password feature for the local session, where the password does not get lost after any timeout. KiTTY only loses the password if you exit the program.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,552
Location:
Prague, Czechia

snovotill wrote:

In WinSCP 5.17.10 the REMEMBER PASSWORD FOR DURATION OF SESSION feature fails whenever AUTOMATICALLY RECONNECT SESSION IF IT BREAKS WHILE IDLE times out. ...
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

snovotill
Joined:
Posts:
2

Thanks. the logfile follows. I opened the connection and then unplugged the network for 20 seconds.

You can see that after I plug the network back in, it asks me for the password. If I only unplug the network for 3 seconds then it does remember the password. It only loses the password AFTER the first re-connect attempt fails. WinSCP 5.17.10.11087
. 2021-03-18 17:29:21.845 Network error: Software caused connection abort
* 2021-03-18 17:29:21.845 (ESshFatal) Network error: Software caused connection abort
. 2021-03-18 17:29:26.954 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:29:26.954 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:29:47.989 Failed to connect to 192.168.0.253: Network error: Connection timed out
. 2021-03-18 17:29:47.989 Knocking FTP port.
. 2021-03-18 17:29:49.999 FTP port did not open.
* 2021-03-18 17:29:50.069 (EFatal) Network error: Connection to "192.168.0.253" timed out.
. 2021-03-18 17:29:55.185 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:29:55.185 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:30:16.217 Failed to connect to 192.168.0.253: Network error: Connection timed out
. 2021-03-18 17:30:16.217 Knocking FTP port.
. 2021-03-18 17:30:18.218 FTP port did not open.
* 2021-03-18 17:30:18.247 (EFatal) Network error: Connection to "192.168.0.253" timed out.
. 2021-03-18 17:30:23.360 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:30:23.360 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:30:23.370 We claim version: SSH-2.0-WinSCP_release_5.17.10
. 2021-03-18 17:30:23.401 Remote version: SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
. 2021-03-18 17:30:23.401 Using SSH protocol version 2
. 2021-03-18 17:30:23.401 Have a known host key of type ssh-ed25519
. 2021-03-18 17:30:23.401 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2021-03-18 17:30:23.500 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
. 2021-03-18 17:30:23.500 Host key fingerprint is:
. 2021-03-18 17:30:23.500 ssh-ed25519 255 25:bd:5a:80:6b:7a:a2:d0:bb:97:91:a5:06:66:02:b1 nj5D9i5wg1D9aBQ8y7T85mzxA4efeLlxoXBTOjhDnuo=
. 2021-03-18 17:30:23.510 Host key matches cached key
. 2021-03-18 17:30:23.510 Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
. 2021-03-18 17:30:23.510 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2021-03-18 17:30:23.510 Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
. 2021-03-18 17:30:23.510 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2021-03-18 17:30:23.510 Using username "root".
. 2021-03-18 17:30:23.530 Server offered these authentication methods: publickey,password
. 2021-03-18 17:30:23.530 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2021-03-18 17:32:13.156 Attempt to close connection due to fatal exception:
. 2021-03-18 17:32:13.156 Closing connection.
* 2021-03-18 17:32:13.255 (ESshFatal) 
. 2021-03-18 17:36:05.574 --------------------------------------------------------------------------
. 2021-03-18 17:36:05.574 WinSCP Version 5.17.10 (Build 11087) (OS 10.0.19041 - Windows 10 Enterprise)
. 2021-03-18 17:36:05.574 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2021-03-18 17:36:05.574 Log level: Normal
. 2021-03-18 17:36:05.574 Local account: ZEROWIN\user
. 2021-03-18 17:36:05.574 Working directory: C:\Program Files (x86)\WinSCP
. 2021-03-18 17:36:05.574 Process ID: 14964
. 2021-03-18 17:36:05.574 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" 
. 2021-03-18 17:36:05.574 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 2021-03-14, DST End: 2021-11-07
. 2021-03-18 17:36:05.574 Login time: March 18, 2021 5:36:05 PM
. 2021-03-18 17:36:05.574 --------------------------------------------------------------------------
. 2021-03-18 17:36:05.574 Session name: root@192.168.0.253 (Site)
. 2021-03-18 17:36:05.574 Host name: 192.168.0.253 (Port: 22)
. 2021-03-18 17:36:05.574 User name: root (Password: No, Key file: No, Passphrase: No)
. 2021-03-18 17:36:05.574 Tunnel: No
. 2021-03-18 17:36:05.574 Transfer Protocol: SFTP (SCP)
. 2021-03-18 17:36:05.574 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2021-03-18 17:36:05.574 Disable Nagle: No
. 2021-03-18 17:36:05.574 Proxy: None
. 2021-03-18 17:36:05.574 Send buffer: 262144
. 2021-03-18 17:36:05.574 SSH protocol version: 2; Compression: No
. 2021-03-18 17:36:05.574 Bypass authentication: No
. 2021-03-18 17:36:05.574 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2021-03-18 17:36:05.574 GSSAPI: Forwarding: No; Libs: gssapi32,sspi,custom; Custom: 
. 2021-03-18 17:36:05.574 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2021-03-18 17:36:05.574 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2021-03-18 17:36:05.574 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2021-03-18 17:36:05.574 Simple channel: Yes
. 2021-03-18 17:36:05.574 Return code variable: Autodetect; Lookup user groups: Auto
. 2021-03-18 17:36:05.574 Shell: default
. 2021-03-18 17:36:05.574 EOL: LF, UTF: Auto
. 2021-03-18 17:36:05.574 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2021-03-18 17:36:05.574 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2021-03-18 17:36:05.574 SFTP Bugs: Auto,Auto
. 2021-03-18 17:36:05.574 SFTP Server: default
. 2021-03-18 17:36:05.574 Local directory: default, Remote directory: /etc/asterisk, Update: Yes, Cache: Yes
. 2021-03-18 17:36:05.574 Cache directory changes: Yes, Permanent: Yes
. 2021-03-18 17:36:05.574 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2021-03-18 17:36:05.574 DST mode: Unix
. 2021-03-18 17:36:05.574 --------------------------------------------------------------------------
. 2021-03-18 17:36:05.614 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:36:05.614 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:36:05.634 We claim version: SSH-2.0-WinSCP_release_5.17.10
. 2021-03-18 17:36:05.674 Remote version: SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
. 2021-03-18 17:36:05.674 Using SSH protocol version 2
. 2021-03-18 17:36:05.674 Have a known host key of type ssh-ed25519
. 2021-03-18 17:36:05.684 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2021-03-18 17:36:05.764 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
. 2021-03-18 17:36:05.764 Host key fingerprint is:
. 2021-03-18 17:36:05.764 ssh-ed25519 255 25:bd:5a:80:6b:7a:a2:d0:bb:97:91:a5:06:66:02:b1 nj5D9i5wg1D9aBQ8y7T85mzxA4efeLlxoXBTOjhDnuo=
. 2021-03-18 17:36:05.804 Host key matches cached key
. 2021-03-18 17:36:05.804 Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
. 2021-03-18 17:36:05.804 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2021-03-18 17:36:05.804 Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
. 2021-03-18 17:36:05.804 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2021-03-18 17:36:05.804 Using username "root".
. 2021-03-18 17:36:05.834 Server offered these authentication methods: publickey,password
. 2021-03-18 17:36:05.834 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2021-03-18 17:36:13.356 Sent password
. 2021-03-18 17:36:13.396 Access granted
. 2021-03-18 17:36:13.396 Opening main session channel
. 2021-03-18 17:36:13.847 Opened main channel
. 2021-03-18 17:36:13.857 Started a shell/command
. 2021-03-18 17:36:13.867 --------------------------------------------------------------------------
. 2021-03-18 17:36:13.867 Using SFTP protocol.
. 2021-03-18 17:36:13.867 Doing startup conversation with host.
> 2021-03-18 17:36:13.877 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2021-03-18 17:36:13.877 Type: SSH_FXP_VERSION, Size: 150, Number: -1
. 2021-03-18 17:36:13.877 SFTP version 3 negotiated.
. 2021-03-18 17:36:13.877 Unknown server extension posix-rename@openssh.com="1"
. 2021-03-18 17:36:13.877 Supports statvfs@openssh.com extension version "2"
. 2021-03-18 17:36:13.877 Unknown server extension fstatvfs@openssh.com="2"
. 2021-03-18 17:36:13.877 Supports hardlink@openssh.com extension version "1"
. 2021-03-18 17:36:13.877 Unknown server extension fsync@openssh.com="1"
. 2021-03-18 17:36:13.877 We believe the server has signed timestamps bug
. 2021-03-18 17:36:13.877 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
. 2021-03-18 17:36:13.877 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2021-03-18 17:36:13.877 Changing directory to "/etc/asterisk".
. 2021-03-18 17:36:13.877 Getting real path for '/etc/asterisk'
> 2021-03-18 17:36:13.877 Type: SSH_FXP_REALPATH, Size: 22, Number: 16
< 2021-03-18 17:36:13.887 Type: SSH_FXP_NAME, Size: 47, Number: 16
. 2021-03-18 17:36:13.887 Real path is '/etc/asterisk'
. 2021-03-18 17:36:13.887 Trying to open directory "/etc/asterisk".
 
<SNIP>
 
. 2021-03-18 17:36:14.607 Startup conversation with host finished.
. 2021-03-18 17:36:20.160 Network error: Software caused connection abort
* 2021-03-18 17:36:20.160 (ESshFatal) Network error: Software caused connection abort
. 2021-03-18 17:36:25.282 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:36:25.282 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:36:46.310 Failed to connect to 192.168.0.253: Network error: Connection timed out
. 2021-03-18 17:36:46.310 Knocking FTP port.
. 2021-03-18 17:36:48.320 FTP port did not open.
* 2021-03-18 17:36:48.340 (EFatal) Network error: Connection to "192.168.0.253" timed out.
. 2021-03-18 17:36:53.460 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:36:53.460 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:37:14.490 Failed to connect to 192.168.0.253: Network error: Connection timed out
. 2021-03-18 17:37:14.490 Knocking FTP port.
. 2021-03-18 17:37:16.490 FTP port did not open.
* 2021-03-18 17:37:16.510 (EFatal) Network error: Connection to "192.168.0.253" timed out.
. 2021-03-18 17:37:21.635 Looking up host "192.168.0.253" for SSH connection
. 2021-03-18 17:37:21.635 Connecting to 192.168.0.253 port 22
. 2021-03-18 17:37:21.635 We claim version: SSH-2.0-WinSCP_release_5.17.10
. 2021-03-18 17:37:21.665 Remote version: SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
. 2021-03-18 17:37:21.665 Using SSH protocol version 2
. 2021-03-18 17:37:21.665 Have a known host key of type ssh-ed25519
. 2021-03-18 17:37:21.675 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2021-03-18 17:37:21.765 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
. 2021-03-18 17:37:21.765 Host key fingerprint is:
. 2021-03-18 17:37:21.765 ssh-ed25519 255 25:bd:5a:80:6b:7a:a2:d0:bb:97:91:a5:06:66:02:b1 nj5D9i5wg1D9aBQ8y7T85mzxA4efeLlxoXBTOjhDnuo=
. 2021-03-18 17:37:21.815 Host key matches cached key
. 2021-03-18 17:37:21.815 Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
. 2021-03-18 17:37:21.815 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2021-03-18 17:37:21.815 Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
. 2021-03-18 17:37:21.815 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2021-03-18 17:37:21.815 Using username "root".
. 2021-03-18 17:37:21.845 Server offered these authentication methods: publickey,password
. 2021-03-18 17:37:21.845 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2021-03-18 17:37:25.916 Attempt to close connection due to fatal exception:
. 2021-03-18 17:37:25.916 Closing connection.
* 2021-03-18 17:37:26.006 (ESshFatal) 

Reply with quote

martin
Site Admin
martin avatar

Re: Thanks. the logfile follows. I opened the connection and then unplugged the network for 20 seconds.

I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

You can post new topics in this forum