summaryrefslogtreecommitdiff
path: root/.config/systemd/user/ssh-agent.service
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-05-19 20:22:06 -0700
committerxyz <gky44px1999@gmail.com>2021-05-19 20:22:06 -0700
commit4b4f034705ac668d268b48c7e23ff879e05e404e (patch)
tree1ba38a60a17844a6e8b37cad894658bb3ff9c04e /.config/systemd/user/ssh-agent.service
parente4c60fa8f9673b6120fe79ccc7f9d638c4137c4e (diff)
-A for ll, alt for screenshot, archwiki approach for ssh-agent
Diffstat (limited to '.config/systemd/user/ssh-agent.service')
-rw-r--r--.config/systemd/user/ssh-agent.service15
1 files changed, 13 insertions, 2 deletions
diff --git a/.config/systemd/user/ssh-agent.service b/.config/systemd/user/ssh-agent.service
index 87d6c045..7d2bf024 100644
--- a/.config/systemd/user/ssh-agent.service
+++ b/.config/systemd/user/ssh-agent.service
@@ -1,10 +1,21 @@
[Unit]
Description=SSH key agent
+# archwiki approach
+# https://wiki.archlinux.org/title/SSH_keys#Start_ssh-agent_with_systemd_user
[Service]
-Type=forking
+Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
-ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK
+# DISPLAY required for ssh-askpass to work
+Environment=DISPLAY=:0
+ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
+
+# github White-Oak approach
+# https://github.com/White-Oak/arch-setup-for-dummies/blob/master/setting-up-ssh-agent.md
+#[Service]
+#Type=forking
+#Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
+#ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target