Bug 454044 - Add option to unmount an sftp connection
Summary: Add option to unmount an sftp connection
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.04.1
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-19 13:18 UTC by Kamil
Modified: 2023-11-01 09:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Mockup of Dolphin network unmount (3.58 KB, image/png)
2023-11-01 09:02 UTC, kimimaru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil 2022-05-19 13:18:51 UTC
SUMMARY
After I unlock the connection with my private key passphrase, Dolphin remembers it and will not ask for the private key again till I log out of my Plasma session.
Can a button be added to completely unmount the sftp connection so it asks for my private key passphrase again?
The button could be in the toolbar, or when rightclicking the entry in Places.
An option to unmount after X minutes of inactivity or after Dolphin closes would be nice to have as well.

It seems like an unnecessary security risk.
And it's just annoying in general, I manage multiple servers that look identical in the home folder, but never multiple at once, it's very easy to click on the wrong server in Places and look through the wrong server's files, just because it was unlocked before.

STEPS TO REPRODUCE
1. Connect to an sftp server by typing a sftp:// link in the location bar
2. Type your private key passphrase
3. There is no way to disconnect
4. Close dolphin
5. Connect to the same sftp server again
6. Dolphin now thinks for a while, like it's creating a new connection?
7. It did not ask for the passphrase this time

SOFTWARE/OS VERSIONS
Linux: 5.17.7-arch1-2 (64-bit)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
This is possible in the Nemo file manager.
I asked on kde subreddit before I write this but I got no answers. 

I thought it might be the fault of a keyring or a wallet, but I do not see anything like this running on my system. Additionally, connecting to a second server that requires the same private key, it asks me to type the passphrase again, so this leads me to a conclusion it's a problem on Dolphin's side.
Comment 1 Oliver Beard 2023-08-08 19:43:10 UTC
You mention two features you want - to be able to unmount an SFTP connection and to not remember the passphrase for your key.

Both *seem* to be possible from a naive look at the sftp implementation in kio-extras:

https://invent.kde.org/network/kio-extras/-/blob/master/sftp/kio_sftp.cpp#L955
https://invent.kde.org/network/kio-extras/-/blob/master/sftp/kio_sftp.cpp#L928

The former is Dolphin's issue. The latter, I think, is with the authentication process in kio-extras, and you should file a separate bug there.
Comment 2 kimimaru 2023-11-01 09:02:48 UTC
Created attachment 162789 [details]
Mockup of Dolphin network unmount

Any updates about this one? Specifically, the lack of an option to unmount has been bugging me for all types of network shares available in Dolphin: SMB, SFTP, WebDav, and so on.

As mentioned in the report, the Nemo file manager handles this very well by showing the network share as a mount. Unmounting it disconnects the connection.

I would be happy with see a similar approach in Dolphin. I've attached a mockup of what it could look like (keeping in mind a generic network connection).