diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-10-19 11:03:29 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-10-19 11:03:29 -0700 |
commit | c3c7878c77000223cbe464a6d6596e01ca92f331 (patch) | |
tree | 3fb2b7f859767d7cb7cc6a13f1aa3c55884d67a1 /.bashrc | |
parent | 1ef1d5e2b41aa36461ee8ebab9c74536c7b8e1a9 (diff) | |
download | dotfiles-c3c7878c77000223cbe464a6d6596e01ca92f331.tar.gz |
add kill-remote-gpg to .bashrc
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -218,6 +218,17 @@ secs () { echo 0 } +# sometimes a remote SSH session cannot get at my forwarded SSH agent +# because an unwanted instance of gpg-agent running on the remote host +# gets in the way. this is a way to kill off that unwanted agent. we +# also need to restart the multiplexed SSH connection to get agent +# forwarding working again. I think this problem is mostly caused by +# the fact that I use gnupg as my SSH agent +kill-remote-gpg () { + ssh "$1" 'rm -f $XDG_RUNTIME_DIR/gnupg/*' + ssh -O exit "$1" +} + # --- host-specific aliases/functions # ftp-master.debian.org |