<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 01/25/2018 03:03 AM, Werner Koch
<blockquote type="cite" style="color: #000000;">
<pre wrap="">$ ssh some-host
fails to ask for the PIN.
<pre wrap="">That is because ssh has no mechanism to tell the ssh-agent (in this case
gpg-agent) the DISPLAY or tty to use for pinentry. This the pinentry
pops up on the tty or X server gpg-agent was initially started.
gpg-connect-agent updatestartuptty /bye
on your current tty tells gpg-agent to updates its default tty and
DISPLAY to the one where you run gpg-connect-agent. ssh will then work
again. After you switch back to another terminal you need to do the
I have to use it always when I move from my standalone laptop to the
Xserver connected to that laptop. It is a bit annoying and the only
clean solution would be to enance the the ssh-agent protocol and
implement that in both, ssh and gpg-agent.</pre>
<p><font size="-1">One option could be to add that snippet of
<pre wrap=""> gpg-connect-agent updatestartuptty /bye
to your <i>.bashrc</i> (or equivalent) file. At the very least it might reduce the
number of times you would have to enter it manually.
Another option could be to create a script which calls gpg-connect-agent first
then calls SSH. Something like this:
gpg-connect-agent updatestartuptty /bye &>/dev/null
<pre class="moz-signature" cols="72">--
Thank you for your time.