public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How does ssh know to use "pinentry"?
Date: Sat, 5 Jul 2014 22:57:11 -0400	[thread overview]
Message-ID: <CAGfcS_kQJjqj38cdDH9ZXBO5xMe8RBs3gryjP=UOH=jTJDc4=w@mail.gmail.com> (raw)
In-Reply-To: <CAPi0psvseDogcHdnCGyc1DoDDoe1ryj2X2RUnx7nDLcXi4mLZQ@mail.gmail.com>

On Sat, Jul 5, 2014 at 9:41 PM, Chris Stankevitz
<chrisstankevitz@gmail.com> wrote:
>
> ssh is asking me for my passphrase using a terrible program called
> "pinentry".  It's terrible for a bunch of reasons, and if you are
> interested you can just google "pinentry sucks".
>

Probably more a case of "X11 sucks."  Historically password entry into
X11 windows has always been problematic, because in general any client
connected to an X server can evesdrop on data entered into any other
window on the server.  That is especially problematic when you
remember that X was supposed to work on a network.  It isn't as bad on
your typical desktop setup, but applications like pinentry are often
designed with the network scenario in mind.

Imagine that you're on an X terminal at work.  You have clients
connected to your terminal from 47 different servers that you
administer.  Maybe you have firefox open from a workstation you
administer at customer A who is having firewall issues and you're
trying to get a sense of what things look like from inside.  Perhaps
you have a mail client open on customer B's server.  You punch in your
password for customer B so that the mail client can retrieve your mail
there, and now the trojaned firefox at customer A has your password
credentials for customer B.  So, you have things like the feature in
xterm which captures all keyboard input so that you can enter a
password securely, but it probably breaks things like copy/paste and
you have to toggle it on/off since while it is on no other window on
your server can listen to the keyboard.

This wasn't really how X11 ended up being used, but back in the day it
was how it was designed to work.  Well, except for the part where X11
is crippled when you have more than a few milliseconds in latency, so
nobody runs clients on remote servers.  But, you still get all the
baggage.

I'm not familiar with the internals of pinentry, but this probably why
you're frustrated with it.

In any case, I suspect that gpg-agent is actually serving passwords to
openssh, so the file you want is ~/.gnupg/gpg-agent.conf - it probably
contains the line "pinentry-program /usr/bin/pinentry".  If you trust
all your X clients you can set the option no-grab in the file which
will probably allow copy/paste/etc to work with the entry window.

Rich


  reply	other threads:[~2014-07-06  2:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-06  1:41 [gentoo-user] How does ssh know to use "pinentry"? Chris Stankevitz
2014-07-06  2:57 ` Rich Freeman [this message]
2014-07-06  3:42   ` Chris Stankevitz
2014-07-06 10:25     ` Rich Freeman
2014-07-06 15:29       ` Chris Stankevitz
2014-07-06 19:09         ` Mick
2014-07-07  0:33           ` Chris Stankevitz
2014-07-06 20:32 ` Alan McKinnon
2014-07-07  0:40   ` Chris Stankevitz
2014-07-07  0:45     ` Rich Freeman
2014-07-07  1:18       ` Chris Stankevitz
2014-07-07  1:30         ` Rich Freeman
2014-07-07  8:05     ` Alan McKinnon

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGfcS_kQJjqj38cdDH9ZXBO5xMe8RBs3gryjP=UOH=jTJDc4=w@mail.gmail.com' \
    --to=rich0@gentoo.org \
    --cc=gentoo-user@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox