mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Remember ssh keys for 24h
This commit is contained in:
parent
9a43154d80
commit
3069532db6
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# start ssh agent, if no agent set
|
# start ssh agent, if no agent set
|
||||||
if [[ -n "${XDG_RUNTIME_DIR}" && -z "${SSH_AUTH_SOCK}" ]]; then
|
if [[ -n "${XDG_RUNTIME_DIR}" && -z "${SSH_AUTH_SOCK}" ]]; then
|
||||||
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
|
||||||
ssh-agent -t 1h > "${XDG_RUNTIME_DIR}/ssh-agent.env"
|
ssh-agent -t 24h > "${XDG_RUNTIME_DIR}/ssh-agent.env"
|
||||||
fi
|
fi
|
||||||
if [[ ! -S "${SSH_AUTH_SOCK}" ]] && [[ -f "${XDG_RUNTIME_DIR}/ssh-agent.env" ]]; then
|
if [[ ! -S "${SSH_AUTH_SOCK}" ]] && [[ -f "${XDG_RUNTIME_DIR}/ssh-agent.env" ]]; then
|
||||||
source "${XDG_RUNTIME_DIR}/ssh-agent.env" > /dev/null
|
source "${XDG_RUNTIME_DIR}/ssh-agent.env" > /dev/null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue