Add an ssh alias to auto-load keychain ssh file if exist.
This commit is contained in:
parent
ca89738866
commit
29ae892b26
12
zlogin
12
zlogin
|
@ -91,23 +91,11 @@ if [ ${USER} != "root" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Launch Keychain for ssh
|
||||
#if [ -f $HOME/.keychain/$HOST-sh ]; then
|
||||
#. $HOME/.keychain/$HOST-sh
|
||||
#else
|
||||
#if [ -f $HOME/.ssh/id_rsa ]; then
|
||||
#keychain --agents ssh id_rsa
|
||||
#. $HOME/.keychain/$HOST-sh
|
||||
#fi
|
||||
#fi
|
||||
|
||||
if [ -f $HOME/.ssh/id_rsa ]; then
|
||||
keychain --agents ssh id_rsa
|
||||
. $HOME/.keychain/$HOST-sh
|
||||
fi
|
||||
|
||||
|
||||
# Launch Keychain for GPG
|
||||
#[ -f $HOME/.keychain/$HOST-sh-gpg ] && \
|
||||
#keychain --agents gpg
|
||||
|
|
3
zshrc
3
zshrc
|
@ -249,6 +249,9 @@ alias ping6="ping6 -c 3"
|
|||
## JOSM
|
||||
alias josm="java -jar -Xmx2048M /opt/josm-tested.jar"
|
||||
|
||||
## SSH
|
||||
alias ssh="test -f ~/.keychain/$HOST-sh_&& source ~/.keychain/$HOST-sh; ssh "
|
||||
|
||||
#######################################
|
||||
#Ouverture d'un programme en fonction
|
||||
#de l'extension du fichier
|
||||
|
|
Loading…
Reference in New Issue