You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
583 B

# OpenSSH authentication agent -
# This will hold your Password for the private key file,
# for use in the Current Shell session only as it does not store this data.
ssha() {
if [ -r "$1" ]; then
eval $(ssh-agent) && ssh-add "$1"
else
echo -e "This requires a Private SSH Key! Please give path & key File! \r\n Example: ~/.ssh/id_rsa"
fi
}
gpg-ssh() {
if [ -n "$(which gpg)" ] && [ -n "$(gpg --list-key)" ]; then
GPG_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
if [ -S "$GPG_SOCK" ]; then
export SSH_AUTH_SOCK=$GPG_SOCK
fi
fi
}
gpg-ssh