openssh/ssh-agent.service
Anthony Rabbito 9417892cb7
openssh-clients: create a user socket unit for ssh-agent (rhbz#2125576)
Signed-off-by: Anthony Rabbito <hello@anthonyrabbito.com>
2022-10-05 19:58:11 -04:00

19 lines
518 B
Desktop File

# Requires SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
# set in environment, handled for example in plasma via
# /etc/xdg/plasma-workspace/env/ssh-agent.sh
[Unit]
ConditionEnvironment=!SSH_AGENT_PID
Description=OpenSSH key agent
Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1)
Requires=ssh-agent.socket
[Service]
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK
PassEnvironment=SSH_AGENT_PID
SuccessExitStatus=2
Type=forking
[Install]
Also=ssh-agent.socket