# 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