How to clear dolphin password after failed sftp login?

Hi,

I use dolphin to manage my files on my web-server and connect with sftp://user@url

Then (only the first time after boot) a dialog appears to enter my password. Dolphin remembers the password until I reboot my machine. So far perfect.

The problem occurs when I enter a wrong password.

Then dolphin shows a red line “connection failed”, but there is no way (…I found no way…) to make dolphin show me the password dialog again to enter the correct password.

Even worse: it seems that dolphin tries several times with the wrong password, so many times, that my server blocks my ssh login for some hours.

I tried to log out/log in here on the local machine, but dolphin still tries with that wrong password. It seems I’d have to shutdown and boot again so that dolphin forgets.

How can I clear dolphins password memory so that it shows me the password dialog again, without rebooting?

Can you help me? Thanks!

This is probably about KDE/Plasma (you forgot to tell)?

When yes, the your password is probably stored in KWallet. Try to find it in KWallet and change is to the correct one.

Yes, I use KDE Plasma 5.27.9

But no, it’s not in KWallet (I checked all passwords in there, it’s not there…). Others, like those for my encrypted disks, are in KWallet, but not the one for this sft login.

I don’t know where dolphin saves this password. It is only saved until reboot. It “survives” user logout/login, but not reboot.

Terminate all instances of dolphin. Make sure dolphin doesn’t run in the background:

karl@erlangen:~> ps ax | grep dolphin
22121 pts/1    S+     0:00 grep --color=auto dolphin
karl@erlangen:~> 

Running e.g. dolphin sftp://mistelberger.net@ssh.mistelberger.net always succeeds on infamous host erlangen. Whenever I enter a wrong password I am asked to retry.

Note: User logout doesn’t terminate the user. Run as root e.g. loginctl terminate-user karl.

I also use sftp (to an external site).

I know I had problems configuring it. Special when I wanted to change something (e.g. password) in the existing config (a lot of trial and error until it worked, BTW also because of problems at the other site).

I found out that it is easier to create a new entry with the correct data and then, after that one works, remove to old non-functioning one. Since I have it functioning, it connects always for at least a year. Also after logout/login and after shutdown/boot.

I glanced through my Kwallet, but I also can not find it.

Don’t now, if I understood correct. That command gives me similar result:

daniel@venus:~> ps ax | grep dolphin
 9385 pts/0    S+     0:00 grep --color=auto dolphin

If I interpret it correct, this is the grep-process, and no dolphin process. I also cannot see any dolphin process using ctrl-esc, or directly top. Still, dolphin has the password remembered.

It behaves the same whether I use the desktop icon to open dolphin and type the sftp-address (or use the bookmark) or if I open it from console with dolphin sftp://user@url.

With a wrong password the error message appears, but there’s no new possibility to retry/enter the correct password.

What about kio?

karl@erlangen:~> LANG=C zypper se -is kio
Loading repository data...
Reading installed packages...

S  | Name                  | Type    | Version     | Arch   | Repository
---+-----------------------+---------+-------------+--------+-----------------------
i+ | baloo5-kioslaves      | package | 5.112.0-1.1 | x86_64 | Haupt-Repository (OSS)
i+ | baloo5-kioslaves-lang | package | 5.112.0-1.1 | noarch | Haupt-Repository (OSS)
i+ | kio                   | package | 5.112.0-1.1 | x86_64 | Haupt-Repository (OSS)
i+ | kio-core              | package | 5.112.0-1.1 | x86_64 | Haupt-Repository (OSS)
i+ | kio-extras5           | package | 23.08.3-1.1 | x86_64 | Haupt-Repository (OSS)
i+ | kio-extras5-lang      | package | 23.08.3-1.1 | noarch | Haupt-Repository (OSS)
i+ | kio-fuse              | package | 5.0.1-4.1   | x86_64 | Haupt-Repository (OSS)
i+ | kio-lang              | package | 5.112.0-1.1 | noarch | Haupt-Repository (OSS)
i+ | kio_audiocd           | package | 23.08.3-1.1 | x86_64 | Haupt-Repository (OSS)
i+ | kio_audiocd-lang      | package | 23.08.3-1.1 | noarch | Haupt-Repository (OSS)
i+ | libkioarchive5        | package | 23.08.3-1.1 | x86_64 | Haupt-Repository (OSS)
karl@erlangen:~> 

I don’t know what to do with that list, but it shows the same as yours (except version numbers):

daniel@venus:~> LANG=C zypper se -is kio
Loading repository data...
Reading installed packages...

S  | Name                  | Type    | Version            | Arch   | Repository
---+-----------------------+---------+--------------------+--------+-----------------
i+ | baloo5-kioslaves      | package | 5.102.0-bp155.1.7  | x86_64 | Haupt-Repository
i+ | baloo5-kioslaves-lang | package | 5.102.0-bp155.1.7  | noarch | Haupt-Repository
i+ | kio                   | package | 5.103.0-150500.1.2 | x86_64 | Haupt-Repository
i+ | kio-core              | package | 5.103.0-150500.1.2 | x86_64 | Haupt-Repository
i+ | kio-extras5           | package | 22.12.3-bp155.1.5  | x86_64 | Haupt-Repository
i+ | kio-extras5-lang      | package | 22.12.3-bp155.1.5  | noarch | Haupt-Repository
i  | kio-fuse              | package | 5.0.1-bp155.3.6    | x86_64 | Haupt-Repository
i+ | kio-lang              | package | 5.103.0-150500.1.2 | noarch | Haupt-Repository
i+ | kio_audiocd           | package | 22.12.3-bp155.1.5  | x86_64 | Haupt-Repository
i+ | kio_audiocd-lang      | package | 22.12.3-bp155.1.5  | noarch | Haupt-Repository
i+ | libkioarchive5        | package | 22.12.3-bp155.1.5  | x86_64 | Haupt-Repository
daniel@venus:~>

You may try and upgrade to the latest version.

But you noticed that this is a Leap 15.5 Thread? Don’t mix your Tumbleweed hosts with the TOs Leap one… The TO already uses the latest Leap 15.5 versions…

In Dolphin ( @hcvv that makes clear it’s about KDE ) in the Locations bar, there’s Network Connections. Click on it and it should be there. AFAIK you can edit it there.
That said, one should never use password auth for web exposed servers. Only use it once, then use ssh-copy-id user@host.name. Accept the host key. Set the remote to do key auth only. Once done ssh user@host.name should work fine without password.

Server says:

karl@erlangen:~> ssh mistelberger.net@ssh.mistelberger.net
mistelberger.net@ssh.mistelberger.net's password: 
This account only supports SFTP
shell request failed on channel 0
karl@erlangen:~> 

Is sftp password login safe?

Leap’s version of kio exhibits annoying behaviour. Needs a fix.

File a bug.

In regard to my problem (dolphin not forgetting wrong password/no possibility to enter new correct password after fail): for me this exists “since always”, at least 3 or 4 years with several former OS and KDE versions. It’s just now that I posted the question because I now must login more often and it annoys when the server locks me out because dolphin made too many attempts with my mistyped password.

For me it would be enough to know how/where dolphin saves this password, or how I can trigger it to give me a new password input dialog after a failed attempt.

Here’s an example of the sftp connection kNetattach (launched from Dolphin) created to my Tuxedo laptop:
sftp://knurpht@192.168.1.110:22/home/knurpht/
This entirely with key auth. Never a password needed, and safe.

You may close dolphin and try killall kiod5. Another option is installing a newer version: SDB:KDE repositories - openSUSE Wiki

Not so fast!

Tried to verify the claim of @danielbasel:

With a wrong password the error message appears, but there’s no new possibility to retry/enter the correct password.

Booted host 6700k, a sibling of infamous host erlangen, into Leap 15.5. dolphin exhibits the same behaviour as observed with Tumbleweed on host erlangen.

  1. It offers entering credentials in a menu. Upon entering a wrong password it asks again for the password.

  2. The password isn’t stored in a separate file.

  3. The menu presented by dolphin allows to save the password in kwallet.

  4. kiod5 remembers the password while running in the background.

@danielbasel may want to delete the wrong password from kwallet and try again.

I cannot reproduce it in Tumbleweed (I do not have Leap with KDE). If I enter the wrong password or use the wrong user name, the password dialogue is repeated and if I cancel password dialogue Dolphin (or, strictly speaking, kio_sftp) repeats it again. If I cancel this session and then again enter the same SFTP URL, I get password prompt again.

I understand that it is TW, not Leap, but I do not really see any striking differences in the code between them. The last significant changes to kio_sftp authentication code happened years ago.

I noticed that after I closed failed authentication dialogue but left Dolphin on the same page with inaccessible SFTP URL, it did pop up authentication dialogue again on its own. May be that is what you observed.

Anyway, there are several possible authentication methods in SSH and they may behave differently. Create file .config/plasma-workspace/env/debug.sh in your home directory with the content

user@uefi:~> cat .config/plasma-workspace/env/debug.sh
export QT_LOGGING_RULES="kf.kio.workers.sftp.debug=true"
user@uefi:~> 

reboot, log in, start in a terminal window

journalctl --user --follow

and then try to access SFTP site in Dolphin using the wrong password. Post the output of journalctl in the terminal window.

And finally explain what you were doing exactly - how you started Dolphin, how you initiated SFTP session. It is quite possible that you are doing something different, but you never provided enough details to reproduce it.

1 Like

SOLVED

I get a new password-input dialog after 1 or 2 minutes when I close the red “Authentication failed” line, put the cursor in the url-line and hint “enter”.

(I found out, because I did the tests and wrote down step by step what I did and what happened, and when after writing to paper I looked again at the screen the dialog was there… So I just need to be more patient :slight_smile: )

To explain, why I haven’t found out before I describe what I usually did:

  • I open dolphin

  • click on the “bookmark” in the left panel with the sftp address

  • enter wrong password in password dialog

  • red line “Authentication failed” appears

  • I close this line clicking on the “x” to the right

  • In the window where the files would be listed it states “Ladevorgang abgebrochen” (Loading process aborted), nothing happens

  • I close dolphin and open it again

  • click again the sftp-bookmark

  • Instead of showing the password dialog, dolphin directly tries to login with the wrong password from before, and again the red error message appears…

  • logout/login my local user in the hope, dolphin would forget the wrong pwd and try again: same result

  • I don’t know how many of those intents it needs, not many, and my server closes ssh/sftp login for some hours. It says nothing, it just doesn’t answer the login. When trying again with dolphin just nothing happens for a long time. Only after a long time dolphin says “timeout”, but I never waited that long until today…

So the simple solution is to close the authentication error message and wait…

Just to complete:

I created the debug.sh file, rebooted, entered the above command, and was warned that I was not in the group ‘systemd-journal’. So I added my user to this group, rebooted, entered the command, but only got “No journal files were found”. Nothing happened in that console window while I tried to false-login to my server with dolphin…