KDE: ssh agent is not started on startup: 'Could not open a connection to your authentication agent'

UPDATE: figured it out - ssh prompts unless stdin is /dev/null - so apparently I messed up the ssh-add < /dev/null command somehow

I'm finding that https://wiki.archlinux.org/index.php/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases does not quite work. The problem for me is the SSH_ASKPASS does not seem to be recognized by git. If I execute it directly, it does run and it does have the password saved in it.

image

I'm having the same issue and I think this started recently as I often use git via SSH to manage my blog and haven't encountered any issue until recently.

I came across this:

https://wiki.archlinux.org/index.php/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases
and

It sounds like KDE has always had on/off issues with ssh-agent not starting properly?

Honestly I wouldn't know. Only started using KDE for a few months now.

Did you find an open bug report for this on kde's gitlab?

No not anything official. I haven't got a chance to really dive into this and fix it up. When I have done so I'll update in this post.

Hi all, there is updated on this? I use several ssh-keys for my daily work, so I don't need just to start the agent each time, but also run 'ssh-add -l' and enter the password everytime I open a console. This, in practice, make this distro unusable.

I have a similar issue, and the problem was that I was importing ~/.ssh/config file from an older OpenSsh version.
Find my solution here.

That was not my issue. I was copying ssh keys from another machine, but not the config.

Just wanted to share my solution.

I installed plasma-ssh-agent (not sure if required) and systemd-ssh-agent (AUR). then activate it

$ systemctl --user enable ssh-agent.service

and reboot.

That package just got removed from the repo in an effort to clean up:

Removing the Plasma SSH-Agent broke ssh agent for me once again on KDE. I spent the past 2 days fixing it with the solutions from the archwiki but without success. Can someone tell me how this is done now.

Solution 1: systemd as a user
https://wiki.archlinux.org/index.php/SSH_keys#Start_ssh-agent_with_systemd_user

Solution 2: 2 boot scripts in the plasma workspace folder and autostart folder
https://wiki.archlinux.org/index.php/KDE_Wallet#Using_the_KDE_Wallet_to_store_ssh_key_passphrases

both without success, I always have to manually start the agent and add my key again:

ssh-agent
eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa </dev/null

But I run into a second issue. Even if I start it manually, Filezilla isn't finding the ssh key. It seems like it needs a SSH-AUTH_SOCK variable but I included this line into my .zprofile
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket"

Seems not to work, though so I really wonder what everyone else is doing to fix all this? Like I said, I worked with the plasma-ssh-agent package.

1 Like

Did you try my solution at the top of the forum?

You posted that your workaround is to use the systemd service as a user but that didn't work for me (see solution 1 I posted). For some reason it still doesn't start the ssh agent. Not sure if I'm missing a small detail?
As I said, everything worked before plasma-ssh-agent got removed from the repos.

I have the same problem after removing plasma-ssh-agent :frowning:

I solved it though its kinda a workaround. I changed the sshd.conf on the server so it allows PAM authentication. Obviously, that works only with the server I reconfigured (on which I have access to). It would still be cool to know how other KDE users manage to do it without PAM. I'm also still not quiet sure if this is a KDE issue or a Manjaro/KDE issue.

I would say right now it is Manjaro.

I have not had this problem on Kubuntu 18.04. 20.04 snapshot beta, 20.04 release, Fedora KDE 31 and 32 (upgrade from 31), Debian KDE (stable 10), or even OpenSuSE KDE.

Thats interesting to hear. Would love to know why plasma-ssh-agent was marked as deprecated then. It seems like its clearly needed. Maybe someone from the team can give a statement or tell us if there will be another solution?

1 Like

I have tried all suggestions from this tread but without success. I don't know whether I had plasma-ssh-agent installed before when it worked, but now it's broken and no one knows how to fix it.

That is a rather sweeping statement. The internet is a very big place. I venture to guess that someone somewhere has posted a solution on the interwebz. Your mission (should you choose to accept it) is to track down the aforementioned solution and expose it to the world.

Yep! And I've tried hard but, didn't succeeded so far. :frowning:

Since this seems to be a Manjaro-only issue, the places to find a solution is indeed limited and the best place to look for it is surely the Manjaro technical issues forum :wink:
Plasma is even one of the officially supported environments so imo the first place to ask for support is in here.

1 Like

Forum kindly sponsored by