I need a way to store some SSH passwords. Note that these are login passwords which I need to pass to ssh; key authentication is unfortunately not an option. I'd like to be able to have KWallet fill them in for me somehow, because I think Gnome-keyring can do this. Does anyone know if KDE has this functionality in KWallet? And if so, how I can set it up to make use of it?

3 Answers 3


I don't have KDE handy but I poked at gnome-keyring a little bit and it looks like it accomplishes this by providing the ssh client with an alternate askpass program.

Check the value of $KWALLET_ASKPASS from your terminal in KDE. If it is set to something try this: export SSH_ASKPASS=$KWALLET_ASKPASS.

If not look around through your distro's packages and see if there is an askpass replacement program associated with kwallet. If so, set SSH_ASKPASS to that program.

  • Does that work even for a password (as opposed to a key passphrase)? OpenSSH is very finicky about reading passwords only from a terminal. Jul 25, 2011 at 11:34

There is a KDE feature request from 2004 to use kwallet as an ssh agent. You might want to comment or vote on that bug.


Seems to be possible now using ksshaskpass (https://archlinux.org/packages/?name=ksshaskpass) using something similar to what Caleb suggested.

guide here https://wiki.archlinux.org/title/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases

  • Unfortunately this refers to SSH Key passphrases, not basic login passwords.
    – roadSurfer
    Oct 21, 2022 at 8:58
  • I see, i'm sorry i misunderstood. Maybe a script could be created, to poll the credentials from kwallet and pipe to the process needing it.
    – Nande
    Oct 24, 2022 at 23:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .