Skip to content

Instantly share code, notes, and snippets.

@Ram-Z
Last active January 12, 2016 21:08
Show Gist options
  • Save Ram-Z/3c1da9940212c8ba48b0 to your computer and use it in GitHub Desktop.
Save Ram-Z/3c1da9940212c8ba48b0 to your computer and use it in GitHub Desktop.
gpg-agent forward
[13:30 ramsi@shada]% pgrep gpg-agent
[1][13:30 ramsi@shada]% gpg-connect-agent /bye
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
[13:31 ramsi@shada]% ll ~/foo
srwxr-xr-x 1 ramsi users 0 Apr 15 13:31 /home/ramsi/foo=
[13:31 ramsi@shada]% ssh tardis -R ~/foo:~/foo
Last login: Wed Apr 15 13:31:57 2015 from 192.168.1.190
[13:32 ramsi@tardis]% ll ~/foo
srw------- 1 ramsi users 0 Apr 15 13:32 /home/ramsi/foo=
[13:32 ramsi@tardis]% pgrep gpg-agent
[1][13:32 ramsi@tardis]% gpg --detach-sign ~/exclude.rsync
gpg: no default secret key: No secret key
gpg: signing failed: No secret key
[2][13:33 ramsi@tardis]% ll ~/foo
srwxr-xr-x 1 ramsi users 0 Apr 15 13:33 /home/ramsi/foo=
[13:33 ramsi@tardis]% pkill gpg-agent
[13:33 ramsi@tardis]% ll ~/foo
ls: cannot access /home/ramsi/foo: No such file or directory
[2][13:33 ramsi@tardis]% gpg-connect-agent /bye
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
[13:34 ramsi@tardis]% ll ~/foo
srwxr-xr-x 1 ramsi users 0 Apr 15 13:34 /home/ramsi/foo=
[13:34 ramsi@tardis]% exit
Connection to tardis.rmz.io closed.
[13:34 ramsi@shada]% ssh tardis -R ~/foo:~/foo
Warning: remote port forwarding failed for listen path /home/ramsi/foo
Last login: Wed Apr 15 13:32:23 2015 from 192.168.1.190
[13:34 ramsi@tardis]%
pinentry-program /usr/bin/pinentry-qt4
debug-all
keep-display
log-file /home/ramsi/gpg-agent.log
extra-socket ~/foo
default-cache-ttl 600
max-cache-ttl 7200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment