Skip to content

bugfix: pubkey auth: resending signature - #2242

Open
j2s2 wants to merge 1 commit into
paramiko:mainfrom
j2s2:main
Open

j2s2 wants to merge 1 commit into
paramiko:mainfrom
j2s2:main

Conversation

@j2s2

@j2s2 j2s2 commented May 22, 2023

Copy link
Copy Markdown

Some Cisco device doesn't respect the RFC for pubkey auth. They ignore signature in the first message and ask again for signature (cf. #122 ). The patch resend the first message with signature in this case.

            bug for C2960 version LANBASE 15
@bskinn

bskinn commented May 23, 2023

Copy link
Copy Markdown
Contributor

This is referenced in #122, but flagging here also as a use-case with needs relevant to the key/auth overhaul of #387.

@j2s2

j2s2 commented Jul 7, 2023

Copy link
Copy Markdown
Author

well ! Should i do something ?

@bskinn

bskinn commented Jul 8, 2023

Copy link
Copy Markdown
Contributor

Sorry for the delay on this.

It looks like you've implemented this off of paramiko v3.1. There is now experimental machinery for a new way of handling authentication available in v3.2 (scroll down until you see the first red callout box).

I don't think bitprophet will be interested in these sorts of fixes off of the 3.1 line. Either (i) the experimental auth handling tools in 3.2 already will allow you to implement this solution, (ii) future work on that overhauled auth machinery will enable it, or (iii) it's something that will get implemented once the core auth overhaul is done.

I would recommend testing out the new auth_strategy machinery in v3.2, to see if that API will let you do what you need to do in your client code, rather than making a change inside paramiko.

Please report back here whether this succeeds or fails -- both types of feedback will be very helpful!

@j2s2

j2s2 commented Jul 10, 2023

Copy link
Copy Markdown
Author

thank for answer !
I have re-apply the patch to the main branch and it fits well.
Should I open a new pull-request ?

@bskinn

bskinn commented Jul 10, 2023

Copy link
Copy Markdown
Contributor

@j2s2 Hm, I think I may not have expressed myself well.

I didn't mean for you to test your patch against main/v3.2.

I meant that you should try to use the new, experimental features already in paramiko v3.2 to see if those features will let you achieve this without further modifications to the paramiko codebase.

@j2s2

j2s2 commented Jul 10, 2023

Copy link
Copy Markdown
Author

Indeed, I misunderstood.
Well ! I already spent lot of time to find where modifying the code as I wanted.
I feel I will spend much more time to understand how to use "auth_strategy" !

Fortunately, the current patch allows the ssh to work on our fleet of switch, at least until v3.2.

@bskinn

bskinn commented Jul 10, 2023

Copy link
Copy Markdown
Contributor

Yes, if this patch will work for you, then that's great!

To note, the patch should still work for paramiko v3.2, and probably for several future versions. bitprophet won't be removing this old machinery for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants