I have ksshaskpass
installed and configured according to Arch Wiki.
Each boot Dolphin asks me to enter a passphrase and there’s no way to tell him to remember. Although after entering it doesn’t ask anymore before session ends, but this is still annoying. Is there any solution to this?
?
My understanding is that’s the way ssh keys work. If you don’t want to enter a passphrase, generate an SSH key pair that doesn’t have a passphrase.
Hi - honestly, I just couldn’t figure out configuring sshaskpass from most guides, but I finally found a post by @soumyadghosh that clicked with me:
Soumya’s basic approach, in case that site isn’t available at some point:
- Create a script in
~/.config/plasma-workspace/env/
that setsSSH_ASKPASS="/usr/bin/ksshaskpass"
and startsssh-agent
if it’s not already running - Create a script in
~/.config/plasma-workspace/shutdown/
that killsssh-agent
if it’s running - Create a script in
~/.local/bin/
that checks if KWallet is running, then adds any keys matching the pattern~/.ssh/id_*
usingssh-add
- Go to System Settings > Autostart and add the last script as a Login Script
I followed that guide, and I have not typed in a SSH key passphrase on my Fedora KDE install in months
Yes, I figured out what was the problem. I was using ssh-agent
systemd unit, and it couldn’t export SSH_AUTH_SOCK
environment variable to the rest of Plasma session, that’s why ssh-agent wasn’t working properly and Dolphin was always asking me for a passphrase.
There was no need for such scripts, I only had to make one file that’s exposing SSH_AUTH_SOCK
to the rest of the session: .config/environment.d/10-ssh-auth-sock.conf
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
UPD: ssh-add-login.sh
is still required.