You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: