diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-05-18 00:24:50 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-05-18 00:27:33 +0300 |
commit | a95626f568680577fee7cec19d8ff6cc65bbd8da (patch) | |
tree | 92b7767cc2f85693f63c1cca3c11b035ffc4eded /fix_permissions.sh | |
parent | .profile: setup chruby (diff) | |
download | linux-home-a95626f568680577fee7cec19d8ff6cc65bbd8da.tar.gz linux-home-a95626f568680577fee7cec19d8ff6cc65bbd8da.zip |
.profile: fix spawn_ssh_agent
I recently had to deal with a system that doesn't have systemd (Alpine),
and it used this "deprecated" way of launching ssh-agent.
It didn't work with agent forwarding though: the local agent would be
launched regardless, somehow overriding the forwarded agent.
This is fixed by testing if SSH_AUTH_SOCK (instead of SSH_AGENT_PID) is
defined, and it is defined for agent-forwarded ssh sessions.
It remains to be seen how this interacts with systems that use the
systemd unit to launch ssh-agent.
Diffstat (limited to 'fix_permissions.sh')
0 files changed, 0 insertions, 0 deletions