You are not logged in.
Hello.
I am trying to set up SSH agent as per instruction from wiki.
I created env file ~/.config/environment.d/80_gpg_agent.conf:
PINENTRY=pinentry-qt
SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.sshYou can't set empty variables in systemd environment so I didn't set SSH_AGENT_PID.
Then, if I don't login into KDE session I have correct value for SSH_AUTH_SOCK:
SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.sshBut after I log into KDE session, it is ovewritten by this:
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socketSince KDE doesn't have built-in SSH-agent I checked following:
ssh-agent is not running
there is no code that sets SSH_AUTH_SOCK in .bashrc, .profile, /etc/bash.bashrc, /etc/profile or /etc/profile.d/*
there are no env variables in /etc/environment or ~/.config/environment.d/* besides one that I set for gpg-agent
I use keepassxc that has embedded ssh-agent but I didn't add it to autostart and it is disabled
So, question is, where is it set and how do I stop this from overriding my env?
Last edited by gudvinr (2022-05-05 09:25:16)
Offline
I apparently solved this issue.
After thorough examination I found out that ~/.pam_environment has override for SSH_AUTH_SOCK:
SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/ssh-agent.socketSince it is marked as deprecated I didn't even thought it might be used.
Offline
Deprecated means that it will stop working at some point in the future and people should switch to an alternative while it still works.
Offline