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

Parse host keys with more than one space or tab #2205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

keachi
Copy link

@keachi keachi commented Mar 11, 2023

This solves #2204.
known_hosts with more than one whitespace or tab are supported by OpenSSH. This should be the case of Paramiko as well.

Copy link
Contributor

@bskinn bskinn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Couple of requested changes, and one request for comment/explanation.

paramiko/hostkeys.py Show resolved Hide resolved
tests/test_hostkeys.py Outdated Show resolved Hide resolved
paramiko/hostkeys.py Outdated Show resolved Hide resolved
@keachi keachi force-pushed the hostkey_split branch 5 times, most recently from 89cc3be to 8023ee9 Compare March 14, 2023 09:07
@bskinn
Copy link
Contributor

bskinn commented Mar 22, 2023

Great, thanks for taking care of these, @keachi!

One thing left - this is worthy of a CHANGELOG entry -- please add one to /sites/www/changelog.rst, if you would.

OpenSSH allows to have more than one whitespace between host and keytype
or between keytype and base64-encoded key. Whitespaces may consists of
spaces and/or tabs.

https://man.openbsd.org/sshd.8#AUTHORIZED_KEYS_FILE_FORMAT
@keachi
Copy link
Author

keachi commented Mar 22, 2023

Fully agree. I added the changelog entry.

@bskinn
Copy link
Contributor

bskinn commented Mar 22, 2023

Flagged for bitprophet review. Thanks, @keachi!

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.

None yet

2 participants