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
|
||||||
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
|
if [ -f $HOME/.ssh/id_rsa ]; then
|
||||||
keychain --agents ssh id_rsa
|
keychain --agents ssh id_rsa
|
||||||
. $HOME/.keychain/$HOST-sh
|
. $HOME/.keychain/$HOST-sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Launch Keychain for GPG
|
# Launch Keychain for GPG
|
||||||
#[ -f $HOME/.keychain/$HOST-sh-gpg ] && \
|
#[ -f $HOME/.keychain/$HOST-sh-gpg ] && \
|
||||||
#keychain --agents gpg
|
#keychain --agents gpg
|
||||||
|
|
3
zshrc
3
zshrc
|
@ -249,6 +249,9 @@ alias ping6="ping6 -c 3"
|
||||||
## JOSM
|
## JOSM
|
||||||
alias josm="java -jar -Xmx2048M /opt/josm-tested.jar"
|
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
|
#Ouverture d'un programme en fonction
|
||||||
#de l'extension du fichier
|
#de l'extension du fichier
|
||||||
|
|
Loading…
Reference in New Issue