Simplify keychain call for SSH
This commit is contained in:
parent
dfb7d0f727
commit
6b2f00d4f0
10
zlogin
10
zlogin
|
@ -77,15 +77,17 @@ if [ ${USER} != "root" ] && [ $(command -v startx) ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Keychain {{{
|
||||||
|
## TODO: user must be able to see ssh-agent process
|
||||||
|
## Be careful with hidepid !
|
||||||
if [ -f $HOME/.ssh/id_rsa ]; then
|
if [ -f $HOME/.ssh/id_rsa ]; then
|
||||||
[[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_rsa
|
eval $(keychain --eval --quiet --agents ssh id_rsa)
|
||||||
source ~/.keychain/$HOST-sh
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $HOME/.ssh/id_ed25519 ]; then
|
if [ -f $HOME/.ssh/id_ed25519 ]; then
|
||||||
[[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_ed25519
|
eval $(keychain --eval --quiet --agents ssh id_ed25519)
|
||||||
source ~/.keychain/$HOST-sh
|
|
||||||
fi
|
fi
|
||||||
|
# }}}
|
||||||
|
|
||||||
# GPG Agent
|
# GPG Agent
|
||||||
if [ -f $HOME/.gnupg/secring.gpg ]; then
|
if [ -f $HOME/.gnupg/secring.gpg ]; then
|
||||||
|
|
Loading…
Reference in New Issue