dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

ssh-agent.service (515B)


      1 # setup module
      2 echo '[Unit]
      3 Description=SSH key agent
      4 
      5 [Service]
      6 Type=simple
      7 Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
      8 ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
      9 
     10 [Install]
     11 WantedBy=default.target' \
     12   > ~/.config/systemd/user/ssh-agent.service
     13 
     14 # setup environment
     15 echo 'SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket"' \
     16   > ~/.pam_environment
     17 
     18 # enable now and at boot
     19 systemctl --user start ssh-agent
     20 systemctl --user enable ssh-agent
     21 
     22 # enable lingering
     23 loginctl enable-linger $(whoami)