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? 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 multiple times with Kubuntu upgrades 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, 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?

Re-categorized this thread to Support and Help , where people answering help requests are more likely to see this.

The Ubuntu Flavors category and its sub-categories are for development discussion.

2 Likes

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.