bugs/get: no passphrase ask for the 2nd ssh invocationyohhttp://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/git-annexikiwiki2022-01-03T16:58:33Zcomment 1http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_1_18e194d53646cb6049058635ad54fe1f/joey2021-12-09T18:59:48Z2021-12-09T18:48:41Z
<p>I do not think that git-annex is doing anything there that prevents ssh
from asking for a password. Ie, it's not setting BatchMode=true,
which it does do when it wants to prevent ssh from prompting for a
password. That is done only when ssh connection caching is supported,
which it's not on Windows.</p>
<p>It's running <code>ssh git@gin.g-node.org -T "git-annex-shell 'p2pstdio' '/yarikoptic/test-annex' '--debug' 'dfff8737-36e2-4a1c-8206-bca071a5294d' --uuid 2a0fa804-1bd6-4298-aa55-4dc2d250eeac"</code>
and that somehow fails, and the failure is at the ssh level (ssh exit status
255 means a ssh error). This might not involve a password at all. For
whatever reason ssh is failing without displaying any error message.</p>
<p>It could be something as simple as this ssh not supporting -T. Or
just being broken in whatever way ssh on windows might be broken.</p>
<p>My suggestion is, run the ssh command yourself, and see if it exits
255, if so proceed to debugging ssh..</p>
comment 2http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_2_2766d9082373c11628006f14262509ad/yarikoptic2021-12-09T19:10:57Z2021-12-09T19:10:57Z
quick one, and I don't have --debug output, but if we use an ssh key without any passphrase, all goes well.
comment 3http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_3_a15a47b120c0c1c1c8ee5050d6105bb1/joey2021-12-09T19:43:30Z2021-12-09T19:37:35Z
<p>That does not help diagnose your problem, does it? All is says is that the
problem somehow involves password protected ssh keys. But ssh is what deals
with those.</p>
<p>You have to show that the problem is actually caused by git-annex, not by ssh,
before I can really do anything about it. The obvious way to do that is
to run the command as I suggested.</p>
comment 4http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_4_72f08e454aad5092acc609a6597d9872/yarikoptic2021-12-09T21:45:29Z2021-12-09T21:45:29Z
here is a screenshot I got: <a href="http://www.onerussian.com/tmp/annex-ssh-20211209.png">http://www.onerussian.com/tmp/annex-ssh-20211209.png</a>
comment 5http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_5_81f23cf6fe835358c9b88af50eab22a5/joey2021-12-13T16:46:59Z2021-12-13T16:41:26Z
<p>What is the exit status of ssh when you run that?</p>
<p>That would normally print out the AUTH-SUCCESS and block waiting for input
from stdin. Your transcript seems to show it closing immediately after that
output, unless perhaps you sent it a ctrl-d.</p>
<p>So perhaps stdin is not getting connected through the <code>ssh -T</code>,
or something could be failing on the remote end.</p>
comment 6http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_6_bbcf4c05813adc2239c1f6017425f1c9/manishofyore2021-12-13T23:12:53Z2021-12-13T23:12:52Z
<p>The behavior on Windows is as you said it is going to be. See screenshot below:</p>
<p>https://ibb.co/cbXBgGM</p>
comment 7http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_7_23715781fb5fd3ece5e042be069812ab/joey2021-12-16T14:54:55Z2021-12-16T14:53:41Z
@manishofyore your screenshot link is broken.
comment 8http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_8_a037b7da3c4f2e04b23706592f04b0ac/manishofyore2021-12-16T18:53:15Z2021-12-16T18:53:15Z
Sorry for that. Here's a much more permanent link: https://github.com/vandermeerlab/data-formats/blob/master/debug/Output.png
comment 9http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_9_6efb1a75b236b4384d1d2fccc3ab30b8/joey2021-12-16T19:25:04Z2021-12-16T19:21:31Z
<p>Thank you. So standard input is not getting connected through the ssh to
git-annex-shell, it appears.</p>
<p>Could you try the same command with without the -T option, and see if it
allows you to interact with it? Eg, after it says "AUTH-SUCCESS", see if
you can enter "test" and if it replies to that.</p>
comment 10http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_10_66386390af02c67c2e5bace223251f53/manishofyore2021-12-16T19:35:02Z2021-12-16T19:35:02Z
<p>By not getting through to the shell, do you mean the absence of a prompt?
In any case here's a screenshot of the command with and without '-T'.
I first press 'Enter' once and see that Error message and
then I type 'test' and press enter. Then I press Ctrl + C
to exit and try the next command without '-T'. And the same result!</p>
<p>https://github.com/vandermeerlab/data-formats/blob/master/debug/Output2.png</p>
comment 11http://git-annex.branchable.com/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation/comment_11_f818dadfa541520ac7ad2409b9174776/joey2022-01-03T16:58:33Z2022-01-03T16:22:05Z
<p>Ok, you've ruled out my theory about -T, and stdin is being connected up
through ssh correctly it looks like.</p>
<p>One other thing to try would be to enable ssh verbose debugging,
by running: <code>git config annex.ssh-options "-v -v -v"</code><br />
And perhaps that will give a clue.</p>
<p>But I think the signs are pointing to you needing to change something
about your ssh installation on Windows. Perhaps a different version of ssh
for Windows would support the GUI password prompt. Normally, ssh comes
from Git for Windows, which bundles a ssh, and I think that one does
support the GUI prompt. Do you have some other ssh build installed?</p>