From 473e31cfb6d2df7dd3b3737154c6dbf0bfdcf77d Mon Sep 17 00:00:00 2001 From: rpriven Date: Sun, 28 Dec 2025 10:56:18 -0700 Subject: [PATCH] Add ssh-agent.service for systemd user session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes SSH agent socket path mismatch issue where system socket unit sets SSH_AUTH_SOCK to wrong path. This service runs standalone without socket activation to avoid conflicts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- systemd-user/.config/systemd/user/ssh-agent.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 systemd-user/.config/systemd/user/ssh-agent.service diff --git a/systemd-user/.config/systemd/user/ssh-agent.service b/systemd-user/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..c4be7ee --- /dev/null +++ b/systemd-user/.config/systemd/user/ssh-agent.service @@ -0,0 +1,12 @@ +[Unit] +Description=SSH Agent +Documentation=man:ssh-agent(1) + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK +ExecStartPost=/bin/sleep 1 + +[Install] +WantedBy=default.target