Mailing List Archive

OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent
Hey guys,

I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
I think this is strange and not the expected behavior. Any ideas what's wrong?

Regards,
Patrick
Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
Re: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
On Wed, 19 Jun 2019, Steinforth, Patrick wrote:

> Hey guys,
>
> I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
> If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
> I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
> I think this is strange and not the expected behavior. Any ideas what's wrong?

Could you send the output of ssh with debugging enabled for both a working
and failing connection? I.e. "ssh -vvv host"

It should show what is going on.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
Hey Damien,

thank you for your reply. I posted the debug information at https://pastebin.com/40esNPED and replaced some sensitive information before (usernames, servernames, domainnames, IP addresses). In addition I commented some lines with a message like "### <my message> ###".

Patrick

-----Urspr?ngliche Nachricht-----
Von: Damien Miller <djm@mindrot.org>
Gesendet: Freitag, 21. Juni 2019 06:40
An: Steinforth, Patrick <Steinforth@osnabrueck.de>
Cc: openssh-unix-dev@mindrot.org
Betreff: Re: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent

On Wed, 19 Jun 2019, Steinforth, Patrick wrote:

> Hey guys,
>
> I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
> If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
> I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
> I think this is strange and not the expected behavior. Any ideas what's wrong?

Could you send the output of ssh with debugging enabled for both a working and failing connection? I.e. "ssh -vvv host"

It should show what is going on.

-d

Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
Re: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
I don't understand why the server is rejecting the key; from the perspective
of the client, it tried to use the key in both cases and the only difference
visible from the client is that it was unsuccessful in the case where the
agent was used.

Are you able to obtain logs from the server? It might offer some clue -
try to run the server in debug mode if you can "sshd -ddd"

Also, it seems that you're using OpenSSH for Windows. You should check
with the Microsoft developers first for that product.

-d

On Fri, 21 Jun 2019, Steinforth, Patrick wrote:

> Hey Damien,
>
> thank you for your reply. I posted the debug information at https://pastebin.com/40esNPED and replaced some sensitive information before (usernames, servernames, domainnames, IP addresses). In addition I commented some lines with a message like "### <my message> ###".
>
> Patrick
>
> -----Urspr?ngliche Nachricht-----
> Von: Damien Miller <djm@mindrot.org>
> Gesendet: Freitag, 21. Juni 2019 06:40
> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
> Cc: openssh-unix-dev@mindrot.org
> Betreff: Re: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent
>
> On Wed, 19 Jun 2019, Steinforth, Patrick wrote:
>
> > Hey guys,
> >
> > I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
> > If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
> > I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
> > I think this is strange and not the expected behavior. Any ideas what's wrong?
>
> Could you send the output of ssh with debugging enabled for both a working and failing connection? I.e. "ssh -vvv host"
>
> It should show what is going on.
>
> -d
>
> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
AW: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
Hi,

I pasted two server connection logs at https://pastebin.com/vJb5tnTL. First a successful one and second an unsuccessful one.

Patrick

-----Urspr?ngliche Nachricht-----
Von: Damien Miller <djm@mindrot.org>
Gesendet: Samstag, 22. Juni 2019 10:43
An: Steinforth, Patrick <Steinforth@osnabrueck.de>
Cc: openssh-unix-dev@mindrot.org
Betreff: Re: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent

I don't understand why the server is rejecting the key; from the perspective of the client, it tried to use the key in both cases and the only difference visible from the client is that it was unsuccessful in the case where the agent was used.

Are you able to obtain logs from the server? It might offer some clue - try to run the server in debug mode if you can "sshd -ddd"

Also, it seems that you're using OpenSSH for Windows. You should check with the Microsoft developers first for that product.

-d

On Fri, 21 Jun 2019, Steinforth, Patrick wrote:

> Hey Damien,
>
> thank you for your reply. I posted the debug information at https://pastebin.com/40esNPED and replaced some sensitive information before (usernames, servernames, domainnames, IP addresses). In addition I commented some lines with a message like "### <my message> ###".
>
> Patrick
>
> -----Urspr?ngliche Nachricht-----
> Von: Damien Miller <djm@mindrot.org>
> Gesendet: Freitag, 21. Juni 2019 06:40
> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
> Cc: openssh-unix-dev@mindrot.org
> Betreff: Re: OpenSSH public key authentication does not work from
> Windows client if private key was added to SSH agent
>
> On Wed, 19 Jun 2019, Steinforth, Patrick wrote:
>
> > Hey guys,
> >
> > I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
> > If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
> > I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
> > I think this is strange and not the expected behavior. Any ideas what's wrong?
>
> Could you send the output of ssh with debugging enabled for both a working and failing connection? I.e. "ssh -vvv host"
>
> It should show what is going on.
>
> -d
>
> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13
> Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
Re: AW: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
Here's the failure:

debug3: mm_answer_keyverify: publickey 000002179BBC60C0 signature unverified

This indicates that your ssh-agent is returning a bad signature for some
reason. I guess you using the Microsoft OpenSSH for Windows port, so I suggest
you file an issue with them https://github.com/PowerShell/Win32-OpenSSH/issues

You might want to try the latest 8.0.0 version from them first though.

On Mon, 24 Jun 2019, Steinforth, Patrick wrote:

> Hi,
>
> I pasted two server connection logs at https://pastebin.com/vJb5tnTL. First a successful one and second an unsuccessful one.
>
> Patrick
>
> -----Urspr?ngliche Nachricht-----
> Von: Damien Miller <djm@mindrot.org>
> Gesendet: Samstag, 22. Juni 2019 10:43
> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
> Cc: openssh-unix-dev@mindrot.org
> Betreff: Re: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent
>
> I don't understand why the server is rejecting the key; from the perspective of the client, it tried to use the key in both cases and the only difference visible from the client is that it was unsuccessful in the case where the agent was used.
>
> Are you able to obtain logs from the server? It might offer some clue - try to run the server in debug mode if you can "sshd -ddd"
>
> Also, it seems that you're using OpenSSH for Windows. You should check with the Microsoft developers first for that product.
>
> -d
>
> On Fri, 21 Jun 2019, Steinforth, Patrick wrote:
>
> > Hey Damien,
> >
> > thank you for your reply. I posted the debug information at https://pastebin.com/40esNPED and replaced some sensitive information before (usernames, servernames, domainnames, IP addresses). In addition I commented some lines with a message like "### <my message> ###".
> >
> > Patrick
> >
> > -----Urspr?ngliche Nachricht-----
> > Von: Damien Miller <djm@mindrot.org>
> > Gesendet: Freitag, 21. Juni 2019 06:40
> > An: Steinforth, Patrick <Steinforth@osnabrueck.de>
> > Cc: openssh-unix-dev@mindrot.org
> > Betreff: Re: OpenSSH public key authentication does not work from
> > Windows client if private key was added to SSH agent
> >
> > On Wed, 19 Jun 2019, Steinforth, Patrick wrote:
> >
> > > Hey guys,
> > >
> > > I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
> > > If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
> > > I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
> > > I think this is strange and not the expected behavior. Any ideas what's wrong?
> >
> > Could you send the output of ssh with debugging enabled for both a working and failing connection? I.e. "ssh -vvv host"
> >
> > It should show what is going on.
> >
> > -d
> >
> > Ich weise Sie darauf hin, dass Ihnen gem. Art. 13
> > Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
One problem I’m seen is that the Windows SSH agent doesn’t seem to respect the flags requesting RSA SHA-2 signatures. I had to disable the negotiation of these signature algorithms to get key negotiation to work properly with RSA keys on Windows 10 when its built-in SSH agent was used. It looks like it always returns a SHA-1 signature.

> On Jun 24, 2019, at 5:43 AM, Damien Miller <djm@mindrot.org> wrote:
>
> Here's the failure:
>
> debug3: mm_answer_keyverify: publickey 000002179BBC60C0 signature unverified
>
> This indicates that your ssh-agent is returning a bad signature for some
> reason. I guess you using the Microsoft OpenSSH for Windows port, so I suggest
> you file an issue with them https://github.com/PowerShell/Win32-OpenSSH/issues
>
> You might want to try the latest 8.0.0 version from them first though.
>
> On Mon, 24 Jun 2019, Steinforth, Patrick wrote:
>
>> Hi,
>>
>> I pasted two server connection logs at https://pastebin.com/vJb5tnTL. First a successful one and second an unsuccessful one.
>>
>> Patrick
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Damien Miller <djm@mindrot.org>
>> Gesendet: Samstag, 22. Juni 2019 10:43
>> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
>> Cc: openssh-unix-dev@mindrot.org
>> Betreff: Re: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent
>>
>> I don't understand why the server is rejecting the key; from the perspective of the client, it tried to use the key in both cases and the only difference visible from the client is that it was unsuccessful in the case where the agent was used.
>>
>> Are you able to obtain logs from the server? It might offer some clue - try to run the server in debug mode if you can "sshd -ddd"
>>
>> Also, it seems that you're using OpenSSH for Windows. You should check with the Microsoft developers first for that product.
>>
>> -d
>>
>> On Fri, 21 Jun 2019, Steinforth, Patrick wrote:
>>
>>> Hey Damien,
>>>
>>> thank you for your reply. I posted the debug information at https://pastebin.com/40esNPED and replaced some sensitive information before (usernames, servernames, domainnames, IP addresses). In addition I commented some lines with a message like "### <my message> ###".
>>>
>>> Patrick
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Damien Miller <djm@mindrot.org>
>>> Gesendet: Freitag, 21. Juni 2019 06:40
>>> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
>>> Cc: openssh-unix-dev@mindrot.org
>>> Betreff: Re: OpenSSH public key authentication does not work from
>>> Windows client if private key was added to SSH agent
>>>
>>> On Wed, 19 Jun 2019, Steinforth, Patrick wrote:
>>>
>>>> Hey guys,
>>>>
>>>> I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
>>>> If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
>>>> I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
>>>> I think this is strange and not the expected behavior. Any ideas what's wrong?
>>>
>>> Could you send the output of ssh with debugging enabled for both a working and failing connection? I.e. "ssh -vvv host"
>>>
>>> It should show what is going on.
>>>
>>> -d
>>>
>>> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13
>>> Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabrück zustehen. Eine ausführliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, können Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html
>> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabrück zustehen. Eine ausführliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, können Sie unter folgenden Link abrufen: https://www.osnabrueck.de/datenschutz.html

--
Ron Frederick
ronf@timeheart.net



_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
RE: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent [ In reply to ]
Yes. This is a known issue (https://github.com/PowerShell/Win32-OpenSSH/issues/1263), fixed in a subsequent release. Please report an issue at https://github.com/PowerShell/Win32-OpenSSH/issues if you feel otherwise.

From: Ron Frederick<mailto:ronf@timeheart.net>
Sent: Monday, June 24, 2019 7:20 AM
To: Damien Miller<mailto:djm@mindrot.org>
Cc: openssh-unix-dev@mindrot.org<mailto:openssh-unix-dev@mindrot.org>
Subject: Re: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent

One problem I?m seen is that the Windows SSH agent doesn?t seem to respect the flags requesting RSA SHA-2 signatures. I had to disable the negotiation of these signature algorithms to get key negotiation to work properly with RSA keys on Windows 10 when its built-in SSH agent was used. It looks like it always returns a SHA-1 signature.

> On Jun 24, 2019, at 5:43 AM, Damien Miller <djm@mindrot.org> wrote:
>
> Here's the failure:
>
> debug3: mm_answer_keyverify: publickey 000002179BBC60C0 signature unverified
>
> This indicates that your ssh-agent is returning a bad signature for some
> reason. I guess you using the Microsoft OpenSSH for Windows port, so I suggest
> you file an issue with them https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FPowerShell%2FWin32-OpenSSH%2Fissues&amp;data=02%7C01%7C%7Cd42fb80d6cee49bc497b08d6f8af1b21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636969828294350208&amp;sdata=OBIGaQTwRf23zJrBQx2VwXfI3dke6ieyCs2xE4vSqyk%3D&amp;reserved=0
>
> You might want to try the latest 8.0.0 version from them first though.
>
> On Mon, 24 Jun 2019, Steinforth, Patrick wrote:
>
>> Hi,
>>
>> I pasted two server connection logs at https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpastebin.com%2FvJb5tnTL&amp;data=02%7C01%7C%7Cd42fb80d6cee49bc497b08d6f8af1b21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636969828294350208&amp;sdata=E9GptgHG74K0nI4K99846Bzl9717lplfbQWo%2B33MJno%3D&amp;reserved=0. First a successful one and second an unsuccessful one.
>>
>> Patrick
>>
>> -----Urspr?ngliche Nachricht-----
>> Von: Damien Miller <djm@mindrot.org>
>> Gesendet: Samstag, 22. Juni 2019 10:43
>> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
>> Cc: openssh-unix-dev@mindrot.org
>> Betreff: Re: AW: OpenSSH public key authentication does not work from Windows client if private key was added to SSH agent
>>
>> I don't understand why the server is rejecting the key; from the perspective of the client, it tried to use the key in both cases and the only difference visible from the client is that it was unsuccessful in the case where the agent was used.
>>
>> Are you able to obtain logs from the server? It might offer some clue - try to run the server in debug mode if you can "sshd -ddd"
>>
>> Also, it seems that you're using OpenSSH for Windows. You should check with the Microsoft developers first for that product.
>>
>> -d
>>
>> On Fri, 21 Jun 2019, Steinforth, Patrick wrote:
>>
>>> Hey Damien,
>>>
>>> thank you for your reply. I posted the debug information at https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpastebin.com%2F40esNPED&amp;data=02%7C01%7C%7Cd42fb80d6cee49bc497b08d6f8af1b21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636969828294350208&amp;sdata=OuX%2B7y8RizMbDUB1rKWy0KfkAo7finmVtV%2B2x7e8rpg%3D&amp;reserved=0 and replaced some sensitive information before (usernames, servernames, domainnames, IP addresses). In addition I commented some lines with a message like "### <my message> ###".
>>>
>>> Patrick
>>>
>>> -----Urspr?ngliche Nachricht-----
>>> Von: Damien Miller <djm@mindrot.org>
>>> Gesendet: Freitag, 21. Juni 2019 06:40
>>> An: Steinforth, Patrick <Steinforth@osnabrueck.de>
>>> Cc: openssh-unix-dev@mindrot.org
>>> Betreff: Re: OpenSSH public key authentication does not work from
>>> Windows client if private key was added to SSH agent
>>>
>>> On Wed, 19 Jun 2019, Steinforth, Patrick wrote:
>>>
>>>> Hey guys,
>>>>
>>>> I installed OpenSSH 7.9p1 on Windows Server 2016 and generated a SSH key pair with ssh-keygen on my Windows 10 Client (OpenSSH 7.6p1). I can connect to the server with "ssh user@domain@servername -i id_rsa". But as soon as I add the private key to the SSH agent by "ssh-add id_rsa" this does not work anymore and aborts with the message "Permission denied (publickey,keyboard-interactive)". The ssh command without "-i id_rsa" leads to the same error. As soon as I remove the private key from the ssh agent, public key authentication works again like a charm.
>>>> If I add the public key on my Ubuntu Server 18.04 LTS to the SSH agent and establish a connection, this works without any problems. SSH client version on Ubuntu is also OpenSSH 7.6p1.
>>>> I noticed further, if I add my key id_rsa to the SSH agent on Windows and copy the key file to id_rsa_new the connection can be established by "ssh user@domain@servername -i id_rsa_new" without any problems, but not with "-i id_rsa".
>>>> I think this is strange and not the expected behavior. Any ideas what's wrong?
>>>
>>> Could you send the output of ssh with debugging enabled for both a working and failing connection? I.e. "ssh -vvv host"
>>>
>>> It should show what is going on.
>>>
>>> -d
>>>
>>> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13
>>> Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.osnabrueck.de%2Fdatenschutz.html&amp;data=02%7C01%7C%7Cd42fb80d6cee49bc497b08d6f8af1b21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636969828294350208&amp;sdata=KRXoMvxaR0RmjAfTc0qTYVxzmPmLU6FBHD9YdJpl%2BUU%3D&amp;reserved=0
>> Ich weise Sie darauf hin, dass Ihnen gem. Art. 13 Datenschutz-Grundverordnung verschiedene Rechte als betroffene Person bei der Verarbeitung von personenbezogenen Daten durch die Stadt Osnabr?ck zustehen. Eine ausf?hrliche Information, welche Rechte dies im Einzelnen sind und wie Ihre Daten verarbeitet werden, k?nnen Sie unter folgenden Link abrufen: https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.osnabrueck.de%2Fdatenschutz.html&amp;data=02%7C01%7C%7Cd42fb80d6cee49bc497b08d6f8af1b21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636969828294350208&amp;sdata=KRXoMvxaR0RmjAfTc0qTYVxzmPmLU6FBHD9YdJpl%2BUU%3D&amp;reserved=0

--
Ron Frederick
ronf@timeheart.net



_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.mindrot.org%2Fmailman%2Flistinfo%2Fopenssh-unix-dev&amp;data=02%7C01%7C%7Cd42fb80d6cee49bc497b08d6f8af1b21%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636969828294360213&amp;sdata=8VoaM65O6u2BiyEesyk6lx%2Bu232buY9jmKda9UrjIgk%3D&amp;reserved=0

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev