Add ssh-agent.service for systemd user session
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 <noreply@anthropic.com>
This commit is contained in:
parent
5b6af65def
commit
473e31cfb6
1 changed files with 12 additions and 0 deletions
12
systemd-user/.config/systemd/user/ssh-agent.service
Normal file
12
systemd-user/.config/systemd/user/ssh-agent.service
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Reference in a new issue