# Dolphin asks for SSH private key passphrase each boot

**URL:** <https://discuss.kde.org/t/dolphin-asks-for-ssh-private-key-passphrase-each-boot/27985>\
**Category:** Help\
**Tags:** dolphin, kwallet, ksshaskpass\
**Created:** [January 7, 2025, 11:36pm UTC](https://discuss.kde.org/t/dolphin-asks-for-ssh-private-key-passphrase-each-boot/27985 "2025-01-07T23:36:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FreePenguin](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/f/eb8c5e/32.png) [@FreePenguin](https://discuss.kde.org/u/FreePenguin)\
**Post date:** [January 7, 2025, 11:36pm UTC](https://discuss.kde.org/t/dolphin-asks-for-ssh-private-key-passphrase-each-boot/27985/1 "2025-01-07T23:36:29Z")

</div>

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?

 ![Снимок экрана_20250108_023326](https://discuss-cdn.kde.org/uploads/default/original/3X/c/b/cb7d88fe006a4bbb8859c1a7517c7a590001a7df.jpeg)

---

<div class="post-metadata">

**Author:** ![jlittle](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/j/9fc348/32.png) [@jlittle](https://discuss.kde.org/u/jlittle)\
**Post date:** [January 8, 2025, 4:15am UTC](https://discuss.kde.org/t/dolphin-asks-for-ssh-private-key-passphrase-each-boot/27985/2 "2025-01-08T04:15:04Z")

</div>

?

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.

---

<div class="post-metadata">

**Author:** ![johnandmegh](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/johnandmegh/32/767_2.png) [@johnandmegh](https://discuss.kde.org/u/johnandmegh)\
**Post date:** [January 8, 2025, 4:38am UTC](https://discuss.kde.org/t/dolphin-asks-for-ssh-private-key-passphrase-each-boot/27985/3 "2025-01-08T04:38:34Z")

</div>

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:

> **[SSH Keys and KWallet: Getting rid of SSH asking passphrase](https://soumyadghosh.github.io/website/blog/kde-ssh-add/)**
>
> So, recently, I shifted some of my workload to kde. And I started my KDE journey with KDE Neon. Even with a 2 year old base and packages, snaps and ppas saved me. Now, one of the important part of my work was to clone the repo using ssh. And here...

Soumya’s basic approach, in case that site isn’t available at some point:

- Create a script in `~/.config/plasma-workspace/env/` that sets `SSH_ASKPASS="/usr/bin/ksshaskpass"` and starts `ssh-agent` if it’s not already running
- Create a script in `~/.config/plasma-workspace/shutdown/` that kills `ssh-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_*` using `ssh-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 🙂

---

<div class="post-metadata">

**Author:** ![FreePenguin](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/f/eb8c5e/32.png) [@FreePenguin](https://discuss.kde.org/u/FreePenguin)\
**Post date:** [January 8, 2025, 9:09am UTC](https://discuss.kde.org/t/dolphin-asks-for-ssh-private-key-passphrase-each-boot/27985/4 "2025-01-08T09:09:19Z")

</div>

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`

```auto
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket

```

**UPD:** `ssh-add-login.sh` is still required.
