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
|
||||
|
||||
# Keychain {{{
|
||||
## TODO: user must be able to see ssh-agent process
|
||||
## Be careful with hidepid !
|
||||
if [ -f $HOME/.ssh/id_rsa ]; then
|
||||
[[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_rsa
|
||||
source ~/.keychain/$HOST-sh
|
||||
eval $(keychain --eval --quiet --agents ssh id_rsa)
|
||||
fi
|
||||
|
||||
if [ -f $HOME/.ssh/id_ed25519 ]; then
|
||||
[[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_ed25519
|
||||
source ~/.keychain/$HOST-sh
|
||||
eval $(keychain --eval --quiet --agents ssh id_ed25519)
|
||||
fi
|
||||
# }}}
|
||||
|
||||
# GPG Agent
|
||||
if [ -f $HOME/.gnupg/secring.gpg ]; then
|
||||
|
|
Loading…
Reference in New Issue