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

Issues with the parsing of known_hosts file #69

Closed
wirawan0 opened this issue May 26, 2012 · 2 comments
Closed

Issues with the parsing of known_hosts file #69

wirawan0 opened this issue May 26, 2012 · 2 comments

Comments

@wirawan0
Copy link

I noticed that the parser that handles the records of known_hosts file is rather simplistic and is unable to handle more general cases used by "real" ssh. In particular the problem is with the routine HostKeyEntry.from_line() that has been that way since 2006 (looking at Git history). Some limitations include:

(1) inability to handle multiple spaces as field separator -- they should be valid
(2) apparently, hashed keys are not supported (yet)

I would like to submit a few patches to address these issues.

To address (1) it is actually as simple as replacing this statement:

fields = line.split(' ')

to:

fields = line.split()

(currently on line 55 of hostkeys.py). I wonder why:

"Lines are expected to not have leading or trailing whitespace."

Wirawan

@rbeede
Copy link

rbeede commented Jul 23, 2013

I have a similar issue with hashed known_hosts which is the default in Ubuntu 12.04 LTS 64-bit Server Edition.

@bitprophet
Copy link
Member

Known hosts functionality has changed a lot in the last year; please reopen if the issue still exists for you. Thanks!

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

No branches or pull requests

3 participants