ssh2 icon indicating copy to clipboard operation
ssh2 copied to clipboard

Fix partial success not passing when using agent authentication

Open lucasvbeek opened this issue 3 years ago • 3 comments

Currently the partialSuccess variable is ignored when using agent authentication, and the client skips to the next agent key. This causes connections to fail when using an agent key + a second authentication method (like 2FA using keyboard-interactive).

With this PR, the client skips to the next authentication method instead of the next agent key when receiving a partial success.

lucasvbeek avatar Sep 13 '22 21:09 lucasvbeek

I think for behavior like this, you're better off using custom authentication handling since "partial success" could mean different things to different servers.

mscdex avatar Sep 13 '22 22:09 mscdex

Partial success is defined pretty clearly in RFC4252, and I believe this is how most clients handle it. Implementing a custom authHandler also won't help, because it's directly calling the tryNextAgentKey function

lucasvbeek avatar Sep 13 '22 23:09 lucasvbeek

@mscdex I'm trying to replicate the same behavior as openssh client in my vscode extension and I'm already using a custom auth handler As @lucasvbeek said this is indeed a bug as partialSuccess is being ignored

jeanp413 avatar Sep 14 '22 04:09 jeanp413