Auto starting ssh-agent doesn't work at all for me

Currently with my setup every single distinct terminal window requires me to:

eval ssh-agent -s
ssh-add my_key

I cannot for the life of me get ssh-agent with kwallet working. I’ve tried various tutorials, this being the last one:

The tldr version of the link above is that I:
-install ksshaskpass,
-configure kwallet to enable the kwallet subsystem
-add an autostart script to ~/.config/plasma-workspace/env which runs eval ssh-agent
-add an autostart script to ~/.config/autostart-scripts which:
1) exports the SSH_ASKPASS var to the location of ksshaskpass (verified)
2) exports the SSH_AUTH_SOCK to $XDG_RUNTIME_DIR/ssh_agent.socket
3) ssh-add my_key

After rebooting, ssh-add -l reports “Could not open a connection to your authentication agent.”. None of the exported variables are persistent, including $XDG_RUNTIME_DIR. I have tried the above tutorial, tutorials from the arch-linux how-to, and another half dozen things.

I would really like to find a way to get manjaro kde plasma pahvo to start up with a wallet integrated ssh-agent method. How do I debug what is going wrong? All searches I’ve done to try and track down logging for autostart scripts yield nothing. journalctl | grep autostart never returns after about 10 minutes.

I really want to become self-sufficient on figuring the stuff out, but I’m dealing with a black hole here. Any tips, please?

1 Like

In general: SSH agents

I am struggling with the same problem. I have tried to create systemd unit and managed to make it work, now after login my ssh-agent.service is active, ssh-agent is running and private keys are added to it. But still, in each new terminal I need to run ssh-agent manually. I would appreciate some more detailed answer as well.