Skip to content

Commit

Permalink
NEW: Systemd ssh-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
jcjgraf committed Sep 11, 2020
1 parent b5270a8 commit 3c656c3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .pam_environment
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket"
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ if [[ "$systemd" = true ]]
then
sudo bash -c "$(declare -f linker); linker \"$dotfiles/acpi\" '/etc/acpi'" # Run as root
linker "$dotfiles/systemd" ~/.config/systemd
linker "$dotfiles/.pam_environment" ~/.config/.pam_environment
fi

if [[ "$homeServer" = true ]]
Expand Down
1 change: 1 addition & 0 deletions systemd/user/default.target.wants/ssh-agent.service
11 changes: 11 additions & 0 deletions systemd/user/ssh-agent.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=SSH key agent

[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
Environment=DISPLAY=:0
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK

[Install]
WantedBy=default.target

0 comments on commit 3c656c3

Please sign in to comment.