Only forward gpg-agent socket over ssh if it exists.

This commit is contained in:
Darren 'Tadgy' Austin 2023-11-03 19:30:12 +00:00
commit fb2d21646f

View file

@ -8,12 +8,15 @@ ConnectTimeout 30
ExitOnForwardFailure yes
ForwardAgent yes
HashKnownHosts no
RemoteForward %d/.gnupg/S.gpg-agent ${HOME}/.gnupg/S.gpg-agent
SendEnv LANG LC_* TERM
StrictHostKeyChecking accept-new
VerifyHostKeyDNS yes
VisualHostKey yes
# Only forward the gpg-agent socket if it exists on the local host.
Match exec "[[ -e ${HOME}/.gnupg/S.gpg-agent ]]"
RemoteForward %d/.gnupg/S.gpg-agent ${HOME}/.gnupg/S.gpg-agent
# Home stuff.
Host afterdark.org.uk
Port 6722