You are not logged in.
I am currently trying to setup ssh-agent so it caches the credentials for my ssh keys.
I followed the instructions in the wiki to start ssh-agent by systemd. I have exported the SSH_AUTH_SOCK variable to .bash_profile and to be sure have sourced the .bash_profile in the .bashrc.
However unfortunately this is not working at all and I have no idea where it goes wrong. ssh is not caching the credentials and ssh-add tells me the following.
Could not open a connection to your authentication agent.Help is appreciated.
Last edited by Sapiens (2023-01-07 16:38:01)
Offline
systemctl --user status ssh-agent.service
echo $SSH_AUTH_SOCK
stat $XDG_RUNTIME_DIR/ssh-agent.socketOffline
...
Last edited by Sapiens (2023-01-07 16:39:46)
Offline
Please don't copy out of the pager (it caps lines, the tailing ">")
However
Oct 08 09:58:00 hell ssh-agent[53822]: SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket./.
echo $SSH_AUTH_SOCK
/tmp/ssh-XXXXXXqCYd3w/agent.20240Should be self explanatory. You're NOT exporting SSH_AUTH_SOCK to your shell, so review that.
Offline
Sorry, my mistake. I did comment the export out before I posted this. I have the export in .bash_profile and .bashrc but get this.
[sapiens]$ echo $SSH_AUTH_SOCK
/run/user/1000/ssh-agent.socket
[sapiens]$ ssh-add ~/.ssh/id_ed25519
Could not open a connection to your authentication agent.When I open ssh sessions I get prompted for the password every time.
Last edited by Sapiens (2023-01-07 16:40:16)
Offline
lsof | grep ssh-agent.socketThough I guess the systemd activation lacks the export of SSH_AGENT_PID, which is not pre-selectable.
How do you start your session?
Offline
...
Last edited by Sapiens (2023-01-07 16:40:41)
Offline
P.S. Now I get the reference to session. I use sway and don't use a display manager, I just login and enter "sway" to start the desktop environment.
Why not just use https://wiki.archlinux.org/title/SSH_ke … er_program ?
Offline
...
Last edited by Sapiens (2023-01-07 16:40:51)
Offline