Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - unsupported key types force paramiko server to close connection #2322

Open
torkve opened this issue Nov 3, 2023 · 0 comments · May be fixed by #2323
Open

[BUG] - unsupported key types force paramiko server to close connection #2322

torkve opened this issue Nov 3, 2023 · 0 comments · May be fixed by #2323
Labels

Comments

@torkve
Copy link

torkve commented Nov 3, 2023

Are you using paramiko as a client or server?

Server

What feature(s) aren't working right?

Keys/auth

What version(s) of paramiko are you using?

2.8.1 - 3.3.1

What version(s) of Python are you using?

2.7, 3.10.12

What operating system and version are you using?

Ubuntu 22.04

If you're connecting as a client, which SSH server are you connecting to?

No response

If you're using paramiko as part of another tool, which tool/version?

No response

Expected/desired behavior

At any moment of a time, paramiko supported set of keys may be less than some new official one, or than one with some proprietary extensions.
OpenSSH server in such cases just ignore authentication attempts with unknown keys, while paramiko forbids and closes connection.
Since client's ssh-agent can contain such unsupported keys, and can attempt them in any order, it is very hard to simultaneously use such agent with paramiko powered servers, and servers that accept "new-kind" keys.

It would be right to just to ignore unknown keys too.

Actual behavior

Paramiko logs: Auth rejected: unsupported or mangled public key (...) and sends _disconnect_no_more_auth to the client.

How to reproduce

Right now I have no good public example, but the case is pretty obvious. As an example (already supported in paramiko) I can give recent lack of support for rsa-sha2-256 kind of keys and certificates.

Anything else?

This code originates from 17 years ago and I found no real reason why it was done so, so I assume it is not intentional behavior, and can safely be changed to match OpenSSH one.

@torkve torkve added the Bug label Nov 3, 2023
@torkve torkve changed the title [BUG] - [BUG] - unsupported key types force paramiko server to close connection Nov 3, 2023
@torkve torkve linked a pull request Nov 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant