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

ssh: Allow passing disabled_algorithms keyword argument from ssh to paramiko #2546

Merged
merged 4 commits into from
Mar 1, 2025

Conversation

Ninja3047
Copy link
Contributor

in order to connect to older/non standard ssh servers using newer versions of paramiko, we need to disable newer algorithms.

    s = ssh(
        ...
        disabled_algorithms={"pubkeys": ["rsa-sha2-512", "rsa-sha2-256"]}
    )

see https://www.paramiko.org/changelog.html#2.9.0

@Ninja3047 Ninja3047 changed the title Allow passing disabled_algorithms keyword argument from ssh to paramiko ssh: Allow passing disabled_algorithms keyword argument from ssh to paramiko Feb 20, 2025
@Ninja3047 Ninja3047 force-pushed the ssh_disabled_algorithms branch from 904bf20 to f30e31d Compare February 21, 2025 01:45
@peace-maker
Copy link
Member

Thank you! I think we cross reference paramiko's docs so please add a reference to the paramiko.transport.Transport docs. I think that's sane instead of copying an example on how to use the argument into our docs.

:class:`~paramiko.transport.Transport`

https://docs.paramiko.org/en/stable/api/transport.html#paramiko.transport.Transport

Readthedocs builds the docs in CI for this PR to check.

@Ninja3047 Ninja3047 force-pushed the ssh_disabled_algorithms branch from 0aaad4d to 0da9825 Compare February 24, 2025 14:44
@@ -266,7 +266,7 @@ def __setattr__(self, name, value):
]

intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
'paramiko': ('https://docs.paramiko.org/en/2.1/', None)}
'paramiko': ('https://docs.paramiko.org/en/stable/', None)}
Copy link
Contributor Author

@Ninja3047 Ninja3047 Mar 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed that the docs were for some reason locked to a very old version of paramiko which did not have the disabled_algorithms keyword argument. Since pwntools doesn't have any particular upper bound version for paramiko, I think it would make more sense if this was linked to stable since that will be what is most likely used? Alternatively, the lowest version of paramiko that does contain the disable_algorithms keyword arg is 2.6

@peace-maker peace-maker merged commit 8b30517 into Gallopsled:dev Mar 1, 2025
14 checks passed
@Ninja3047 Ninja3047 deleted the ssh_disabled_algorithms branch March 2, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants