You are not logged in.
Hi,
since the last reboot (and maybe update), I get the following error message when I try to use the ssh-agent as my user:
$ ssh-add -l
Could not open a connection to your authentication agent.
A call of ssh-agent results in the following output:
$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXceDXBP/agent.3697; export SSH_AUTH_SOCK;
SSH_AGENT_PID=3698; export SSH_AGENT_PID;
echo Agent pid 3698;
Listing /tmp
$ ls /tmp/ssh-XXXXXXMWd8bs/agent.3993
/tmp/ssh-XXXXXXMWd8bs/agent.3993
I have noticed that after each call of ssh-agent a new directory in /tmp/ssh-XXXXX... is created.
Thanks in advance for any help!
Klaus.
Last edited by tachtler (2024-02-20 13:27:04)
Offline
you starting agent again? is it started before running ssh-add? - each call for ssh-agent start new agent, this is how it work.
read this on how to use ssh-agent: https://wiki.archlinux.org/title/SSH_keys#SSH_agents
Offline
Hi,
thank you for your answer.
My problem is that it is only when I actually start the agent with eval $(ssh-agent) that I have access to it, no matter how many times I type ssh-agent.
Thanks and regards
Klaus.
Offline
If it is recent change with gnome, this thread may be related:
https://bbs.archlinux.org/viewtopic.php?id=293029
eval $(ssh-agent) only "valid" for current shell (as SSH_AUTH_SOCK env can only be set for current shel via this command). - in the wiki link there is how to use user systemd service for agent, it can be used in every app (without starting new agent for each one) this way.
Offline
Hi,
thank you for the Link →
With GNOME installed → I've added to ~/.bashrc
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh
Without GNOME installed → I've added to ~/.bashrc
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
and enabled the service
systemctl enable --user ssh-agent.service
Nothing more, that did the trick for me!
Thank you so much for your help!
Greetings
Klaus.
Last edited by tachtler (2024-02-22 06:34:43)
Offline