diff options
| author | Yuval Adam <_@yuv.al> | 2016-12-23 01:07:53 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2016-12-23 01:07:53 +0200 |
| commit | 41bc1b1ddba06de65f3bfec6b9b0c17f93f21aac (patch) | |
| tree | 08c92167cb159c9d7f82659cf5f3a4ff829b74e6 | |
| parent | fe3c62cd3477ae524346ee0d3ded90899923386d (diff) | |
Switch to systemd unit based SSH agent
| -rw-r--r-- | .bash_profile | 1 | ||||
| -rw-r--r-- | .bashrc | 2 | ||||
| -rw-r--r-- | .config/systemd/user/ssh-agent.service | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/.bash_profile b/.bash_profile index 0006ff8..efac808 100644 --- a/.bash_profile +++ b/.bash_profile @@ -2,6 +2,5 @@ # ~/.bash_profile # -eval `ssh-agent` [[ -f ~/.bashrc ]] && . ~/.bashrc @@ -8,3 +8,5 @@ alias ls='ls --color=auto' alias ll='ls -la' PS1='[\u@\h \W]\$ ' + +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" diff --git a/.config/systemd/user/ssh-agent.service b/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..87d6c04 --- /dev/null +++ b/.config/systemd/user/ssh-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=forking +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target |
