summaryrefslogtreecommitdiff
path: root/modules/profiles/files/ssh-agent.service
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profiles/files/ssh-agent.service')
-rw-r--r--modules/profiles/files/ssh-agent.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/profiles/files/ssh-agent.service b/modules/profiles/files/ssh-agent.service
new file mode 100644
index 0000000..d49edc6
--- /dev/null
+++ b/modules/profiles/files/ssh-agent.service
@@ -0,0 +1,13 @@
+# https://unix.stackexchange.com/questions/339840/how-to-start-and-use-ssh-agent-as-systemd-service
+
+[Unit]
+Description=SSH key agent
+
+[Service]
+Type=simple
+Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
+# ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+
+[Install]
+WantedBy=default.target