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

Hello,

When you use ssh-add to add an ssh key you get the error: 'Could not open a connection to your authentication agent'. Which means you need to manually start the auth daemon to do any work with private git repos.

I encountered this bug with overwriting my Manjaro Cinnamon installs with Manjaro KDE with 18.1.0 and again with 18.1.2; on two separate machines.

How to reproduce:
Install KDE Edition 18.1.0 and higher.
Use ssh-add, even with no files in .ssh

(When it works it should either complain about not finding a file or add your ssh key.)

A workaround I found is to add an autostart to the user's systemd config:

$HOME/.config/systemd/user/ssh-agent.service

[Unit]
Description=SSH key agent

[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

I admit I am new to KDE, but I really believe this is something that should be working out of the box. I use a dotfile manager to configure my machines from a private repo so this is a unique issue I have not encountered on other distros.

The only post I have found related to this was below and no one commented on it.

That is strange, I have not had any issues with ssh myself.

On my system I have these installed:

  • sshpass
  • ksshaskpass
  • lib32-libssh2
  • libssh
  • libssh2
  • openssh
  • sshfs

I typically use fish:// in dolphin, but I also use sshpass in scripts regularly.

Also what do you mean by:

Wipe the Manjaro Cinnamon partition and install Manjaro KDE in it's place.

I had earlier installed Manjaro KDE on smaller SSD with no problems with SSH, so it's a recent issue.

Could it possibly be some settings issue on you home partition coming from the cinnamon to Plasma5 access of your home partition?

PS. This is why I never recommend sharing your home partition, especially between distributions.

Just tried Manjaro GNOME with ssh-add.

No issues with ssh.

Keep in mind both the kde and GNOME 18.1.2 installs is a mostly fresh system with no software installed by default. ssh-add works on GNOME. Does not work on KDE.

I am not sharing a home partition. Everything this is installed fresh, to one partition.

But you just said it did on.

Unless you used a different ISO for both Plasma5 installs, then I'd say the issue is elsewhere on that system.

No I did not. I installed it on a separate SSD. Even then, they do not share a home partition. I do not know where you could have gotten that idea.

OK, then what does "I had earlier installed Manjaro KDE on smaller SSD with no problems with SSH" mean?

I'm just trying to ascertain if you used the same ISO burn on both installs?

I had a smaller SSD on my desktop when I tried KDE Manjaro with. Liked it. It was a much older version than 18.1.0. I don't remember what it was. Did not have ssh problem.

I installed 18.1.0 on my laptop, had the ssh problem.

I installed 18.1.2 on my main ssd on my desktop. Also had ssh problem.

That is why I say this ssh problem is a recent development that seems to be with the KDE install.

OK, now we are getting somewhere.
Could be something missing from the ISO then.

All are also, clean installs. The laptop has a swap partition, the desktop does not.

Yea, that shouldn't make a difference, unless your running out of ram.
Check to see if you have the packages I previously listed installed.

not installed:

  • sshpass
  • lib32-libssh2

installed:

  • ksshaskpass
  • libssh
  • libssh2
  • openssh
  • sshfs

Try installing those and see if that helps.

Also see if these are installed:
xorg-xauth
x11-ssh-askpass

update: ksshaskpass actually provides x11-ssh-askpass

Installing those two made no difference.

xorg-xauth was already installed.

I think you are missing something in the install script or the initial config files.

I just tested this in a Manjaro KDE Virtualbox VM. You can reproduce the error exactly in it.

The error does not show (ssh-add works) in a Manjaro GNOME VM.

edit: also, I restarted the VM everytime I installed a new pkg.

This is really odd. There has to be something missing, but what?
If it was a bug then even on an upgraded system the issue should emerge.
These packages come from upstream arch, i'll see if any issues are reported there.

Maybe something that KDE needs to start the auth daemon?

Not sure, I was googleing it, this is an issue that some new installs of GNOME had with other distros.

Good idea. Thank you. I gotta get back to work, will check in the afternoon or tomorrow.

Hi @AJSlye,

Do you have any updates on this?

Hi @philm and @oberon,

I am tagging you because I believe I have discovered an issue with ssh with recent Manjaro KDE isos that prevents new users from using private git repos because the auth service is not started up by default.

You can reproduce this by installing the 18.1.2 KDE on a VM, then running ssh-add in terminal. The auth service will not be running. You do not need to supply a key file.

This does not happen with the 18.1.2 GNOME on a VM, it doesn't give any feedback which is normal.

Forum kindly sponsored by