ssh-agent: Add lifetime for added keys
This commit is contained in:
parent
7e7d6dad1b
commit
490745508a
@ -15,8 +15,10 @@
|
||||
# If a session already exists {{{
|
||||
#if-shell -b 'tmux has-session' {
|
||||
|
||||
## Temp window to ensure a ssh-agent is running
|
||||
#new-window -nAuth 'ssh-agent -a "${SSH_AGENT_SOCK}" ; logout'
|
||||
## Temp window to ensure a ssh-agent is running with
|
||||
## * specific SOCKET path
|
||||
## * life duration
|
||||
#new-window -nSSH-Agent 'ssh-agent -a "${SSH_AGENT_SOCK}" -t 4h ; logout'
|
||||
|
||||
## Window for authentication tools
|
||||
#display-message "Create a new window for Authentication"
|
||||
@ -32,8 +34,10 @@ if-shell -b 'test -z $TMUX' {
|
||||
## Attach the last session
|
||||
attach-session
|
||||
|
||||
## Temp window to ensure a ssh-agent is running
|
||||
new-window -nSSH-Agent 'ssh-agent -a "${SSH_AGENT_SOCK}" ; logout'
|
||||
## Temp window to ensure a ssh-agent is running with
|
||||
## * specific SOCKET path
|
||||
## * life duration
|
||||
new-window -nSSH-Agent 'ssh-agent -a "${SSH_AGENT_SOCK}" -t 4h ; logout'
|
||||
|
||||
## Window for authentication tools
|
||||
display-message "Create a new window for Authentication"
|
||||
@ -46,8 +50,10 @@ if-shell -b 'test -z $TMUX' {
|
||||
# }}}
|
||||
# If file was source from a running tmux {{{
|
||||
if-shell -b 'test -n $TMUX' {
|
||||
## Temp window to ensure a ssh-agent is running
|
||||
new-window -nSSH-Agent 'ssh-agent -a "${SSH_AGENT_SOCK}" ; logout'
|
||||
## Temp window to ensure a ssh-agent is running with
|
||||
## * specific SOCKET path
|
||||
## * life duration
|
||||
new-window -nSSH-Agent 'ssh-agent -a "${SSH_AGENT_SOCK}" -t 4h ; logout'
|
||||
|
||||
## Window for authentication tools
|
||||
display-message "Create a new window for Authentication"
|
||||
|
Loading…
Reference in New Issue
Block a user