I am trying to forward a gpg-agent
Unix socket to a remote machine. I have tried the following two versions of the remote forwarding command:
- A:
ssh -vvv -N -R ~/.gnupg/S.gpg-agent:~/.gnupg/S.gpg-agent.extra {HOST}
- B:
ssh -vvv -N -R ~/.gnupg/S.gpg-agent:/home/{USER}/.gnupg/S.gpg-agent.extra {HOST}
They both report successful remote forwarding after initial ssh
connection. However, option A's socket fails with debug1: connect_next: host ~/.gnupg/S.gpg-agent.extra ([unix]:~/.gnupg/S.gpg-agent.extra): No such file or directory
when an actual data connection is attempted on the remote machine with gpg-connect-agent /bye
while option B's socket works fine.
I want to know whether it is possible to do local home directory expansion with ssh
remote forwarding command. If not, why?