diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2018-06-05 02:22:53 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2018-06-05 02:22:53 +0300 |
commit | 77242c62757c3ed1d1289196097380f168087071 (patch) | |
tree | fd8b8ad954365b60f438a622d3484772fdeaf779 /%HOME%/.config/systemd/user | |
parent | add comments (diff) | |
download | linux-home-77242c62757c3ed1d1289196097380f168087071.tar.gz linux-home-77242c62757c3ed1d1289196097380f168087071.zip |
add ssh-agent systemd unit
Diffstat (limited to '%HOME%/.config/systemd/user')
-rw-r--r-- | %HOME%/.config/systemd/user/ssh-agent.service | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/%HOME%/.config/systemd/user/ssh-agent.service b/%HOME%/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..297ab75 --- /dev/null +++ b/%HOME%/.config/systemd/user/ssh-agent.service @@ -0,0 +1,20 @@ +# Enable using: systemd --user enable ssh-agent +# Start immediately using: systemd --user start ssh-agent +# Make sure SSH_AUTH_SOCK is set to "$XDG_RUNTIME_DIR/ssh-agent.socket". +# You can do this by adding it to ~/.profile (the usual way) or +# ~/.pam_environment: +# * "SSH_AUTH_SOCK DEFAULT=${XDG_RUNTIME_DIR}/ssh-agent.socket", or, if it +# doesn't work, +# * "SSH_AUTH_SOCK DEFAULT=/run/user/1000/ssh-agent.socket" (replace "1000" +# with your UID. + +[Unit] +Description=OpenSSH agent + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -D -a "$SSH_AUTH_SOCK" + +[Install] +WantedBy=default.target |