From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Neil Roberts <neil@linux.intel.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 0/2] Prompting for the GPG password within Emacs
Date: Mon, 08 Jul 2013 07:44:23 -0400 [thread overview]
Message-ID: <51DAA617.4090308@fifthhorseman.net> (raw)
In-Reply-To: <87r4f9xqc7.fsf@neilpc.config>
[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]
Hi Niel--
On 07/08/2013 07:07 AM, Neil Roberts wrote:
> Both machines are trusted personal machines so I can put the keys on
> either (or both).
cool, this makes it a little bit easier.
> I think what would be ideal is if OpenSSH could
> support gpg-agent forwarding like it does for ssh-agent.
Hm, interesting. I bet we could figure out a way to do this with
existing OpenSSH without needing to patch anything, as long as you're
willing to use helper utilities like socat.
it came up on a blog post i made a while back about forwarding
unix-domain sockets over ssh:
https://www.debian-administration.org/users/dkg/weblog/68
but no one offered an explicit recipe, and my examples there are for
forwarding a unix domain socket from the ssh client to the ssh server,
which i think is the reverse of what you're proposing.
I just did a little test, and got the following to work with a single
connection (a bit more tuning and you can probably make it work repeatedly):
on the remote server (i'll call it "xxx"), i did:
mkdir ~/.sockets
chmod 0700 ~/.sockets
export GPG_AGENT_INFO=~/.sockets/S.gpg-agent:0:1
and on my local machine, i ran the following bash command (this is all
one command, sorry about the line wrap):
socat
EXEC:'ssh xxx socat UNIX-LISTEN\:.sockets/S.gpg-agent STDIO'
UNIX:${GPG_AGENT_INFO%%:*}
then on the remote server, i created a secret key, and ran:
echo test > test.txt
gpg --clearsign test.txt
and was prompted by my local graphical gpg-agent.
note that this means that any passphrases cached by my local gpg-agent
are also visible to the account on the remote server, but in your
scenario (you control and trust both machines) that should be OK.
hth,
--dkg
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1027 bytes --]
next prev parent reply other threads:[~2013-07-08 11:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 11:14 [PATCH 0/2] Prompting for the GPG password within Emacs Neil Roberts
2013-07-07 11:14 ` [PATCH 1/2] cli: crypto: Support requesting passwords via FDs from the caller Neil Roberts
2013-07-07 11:14 ` [PATCH 2/2] emacs: crypto: Handle prompting for passwords Neil Roberts
2013-07-07 23:08 ` [PATCH 0/2] Prompting for the GPG password within Emacs Daniel Kahn Gillmor
2013-07-08 6:45 ` craven
2013-07-08 10:55 ` Daniel Kahn Gillmor
2013-07-08 21:39 ` Peter Feigl
2013-07-09 13:26 ` Peter Feigl
2013-07-10 7:27 ` Peter Feigl
2013-07-13 8:37 ` Tomi Ollila
2013-07-08 11:07 ` Neil Roberts
2013-07-08 11:44 ` Daniel Kahn Gillmor [this message]
2013-07-08 12:19 ` Neil Roberts
2013-07-08 12:22 ` Daniel Kahn Gillmor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51DAA617.4090308@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=neil@linux.intel.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).