Ssh-add -L hangs after Kubuntu 25.10 upgrade from 25.04

Since upgrading from 25.04 to 25.10, using ssh with GitHub has stopped working. ssh-add -L just hangs.

Should ksshaskpass or kwalletaskpass be the default ssh-askpass in Kubuntu 25.10 / Plasma 6.4.5? I see:

> update-alternatives --config ssh-askpass
There are 2 choices for the alternative ssh-askpass (providing /usr/bin/ssh-askpass).

  Selection    Path                     Priority   Status
------------------------------------------------------------
* 0            /usr/bin/ksshaskpass      35        auto mode
  1            /usr/bin/ksshaskpass      35        manual mode
  2            /usr/bin/kwalletaskpass   30        manual mode

I want to check that is correct.

It seems like it cannot open the password dialog:

> ssh-add -v ~/.ssh/id_rsa 
debug1: read_passphrase: requested to askpass

Running ksshaskpass does however show a password prompt.

Killing the agent and starting another works:

pkill ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

My ssh-agent.service file:

[Unit]
Description=SSH key agent
After=graphical-session.target

[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK

[Install]
WantedBy=default.target

ssh_auth_socket.conf:

SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/ssh-agent.socket

ssh_askpass.conf:

SSH_ASKPASS=/usr/bin/ksshaskpass
SSH_ASKPASS_REQUIRE=prefer

I have run into problems with ssh after Kubuntu upgrades multiple times in the past. Nearly 3 years ago, I asked this How do I set up KDE, KWallet and ssh so I’m not asked to enter my ssh passphrase? on Unix&Linux Exchange, and answered my own question with a ksshaskpass setup that worked with Kubuntu 22.10.

Later when I upgraded to 24.04, the dialog changed from ksshaskpass to pinentry-qt and I had to make a setup with kwalletcli.

Now with 25.10 and Plasma 6.4.5, it seems that the default has changed back again to ksshaskpass after upgrade, but it’s not working properly (again).

I am now confused about what the default should be and how to make a working setup. Has anyone experienced this issue? Does anyone have a solution?

It seems like SSH_AUTH_SOCK is not set correctly. It is /run/user/1000/openssh_agent in bash. I have added in ~/.bashrc: export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" which appears to fix the issue.

The name of your environment config file is not valid, and I have seen this exact problem cause it not to be used.

TL;DR mv ssh_auth_socket.conf 60-ssh_auth_socket.conf

That didn’t fix it for me unfortunately. Only the .bashrc export seems to make any difference.

If your environment is actually loaded, you can confirm it with

echo $SSH_AUTH_SOCK

If that works, then I’d guess what you’re bumping into is that KDE won’t use that environment, so your socket will be found in a terminal, but not in GUI apps. I use this:

echo 'export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"' | sudo tee /etc/xdg/plasma-workspace/env/ssh-agent.sh

Here for that reason and it works as expected. You could put the same file in your user directory ie

echo 'export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"' | tee ~/.config/plasma-workspace/env/ssh-agent.sh

If you prefer.

1 Like

Thanks! I’ve added that to https://unix.stackexchange.com/a/724895/266948

1 Like