Keychain eingebaut
This commit is contained in:
parent
fe5694fea8
commit
5027fbc824
2 changed files with 4 additions and 19 deletions
21
.bash_extra
21
.bash_extra
|
@ -4,25 +4,8 @@ if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
||||||
tmux attach -t default || tmux new -s default
|
tmux attach -t default || tmux new -s default
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### ssh-agent
|
### keychain
|
||||||
# https://rabexc.org/posts/pitfalls-of-ssh-agents
|
eval $(keychain -q --eval --timeout 60 --agents ssh)
|
||||||
SSH_ENV="$HOME/.ssh/environment"
|
|
||||||
function start_agent {
|
|
||||||
echo "Initialising new SSH agent..."
|
|
||||||
(umask 066; /usr/bin/ssh-agent > "${SSH_ENV}")
|
|
||||||
. "${SSH_ENV}" > /dev/null
|
|
||||||
/usr/bin/ssh-add;
|
|
||||||
}
|
|
||||||
# Source SSH settings, if applicable
|
|
||||||
if [ -f "${SSH_ENV}" ]; then
|
|
||||||
. "${SSH_ENV}" > /dev/null
|
|
||||||
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
|
|
||||||
start_agent;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
start_agent;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
### PS1
|
### PS1
|
||||||
# git-symbole: * unstaged, + staged, $ stashed, % untracked
|
# git-symbole: * unstaged, + staged, $ stashed, % untracked
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
### ssh-agent
|
### ssh-agent
|
||||||
|
IgnoreUnknown UseKeychain
|
||||||
|
UseKeychain yes
|
||||||
AddKeysToAgent yes
|
AddKeysToAgent yes
|
||||||
|
|
||||||
### grote.lan
|
### grote.lan
|
||||||
|
|
Loading…
Reference in a new issue