NEW: Systemd ssh-agent

This commit is contained in:
Jean-Claude 2020-09-11 21:22:56 +02:00
parent 2db5aebe47
commit f96eb37bf1
Signed by untrusted user: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
4 changed files with 14 additions and 0 deletions

1
.pam_environment Normal file
View File

@ -0,0 +1 @@
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket"

View File

@ -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 ]]

View File

@ -0,0 +1 @@
/home/jeanclaude/.config/systemd/user/ssh-agent.service

View File

@ -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