summarylogtreecommitdiffstats
path: root/ssh-agent.service
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-agent.service')
-rw-r--r--ssh-agent.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/ssh-agent.service b/ssh-agent.service
new file mode 100644
index 000000000000..d3bb27e950b2
--- /dev/null
+++ b/ssh-agent.service
@@ -0,0 +1,15 @@
+# Requires SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" to be set in environment
+[Unit]
+ConditionEnvironment=!SSH_AGENT_PID
+Description=OpenSSH-HPN key agent (upstream shim)
+Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1)
+
+[Service]
+Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
+ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+PassEnvironment=SSH_AGENT_PID
+SuccessExitStatus=2
+Type=simple
+
+[Install]
+Also=default.socket