Bug 2294 - parsing known hosts files with tabs doesn't work
Summary: parsing known hosts files with tabs doesn't work
Status: CLOSED DUPLICATE of bug 2623
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 6.7p1
Hardware: All All
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-15 08:47 AEDT by Christoph Anton Mitterer
Modified: 2021-04-23 15:10 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Anton Mitterer 2014-10-15 08:47:44 AEDT
Hi.

AFAIU, using (multiple) tabs in e.g. sshd_config or ssh_config works, e.g. one can justify one's options like this:
AddressFamily   any
Port            22
ListenAddress   localhost
by having (multiple) tabs and/or (multiple) spaces between directive and option or between two options.


I tried to do the same on known hosts files,... after having a very short glance at hostfile.c it thought it would work,... but apparently it does not.
host.example.org,host ecdsa-sha2-nistp521 AAA...
host.example.org,host ssh-rsa             AAA...
foo                   ssh-ed25519         AAA...

apparently it still works to have a tab between hostname(s) filed and algorithm,... but when there is one or more tabs between algo and key data,... ssh apparently no longer recognises that line and asks me to verify the fingerprint.


Now I don't know whether this is expected to work (and a bug), or whether it's not expected to work.... than this could be an request for enhancement,... i.e. in all places where one space is allowed as a field separator, multiple tabs and/or spaces should be allowed as well.


Oh and should this ever be made working,... I've just seen that bash-completion fails miserably when having (multiple) spaces/tabs in the known hosts files, it even suggests th algos and the key material as a completion target... so one should then probably report a bug there as well, to have that fixed.


Cheers,
Chris.
Comment 1 Damien Miller 2020-01-26 00:29:25 AEDT

*** This bug has been marked as a duplicate of bug 2623 ***
Comment 2 Damien Miller 2021-04-23 15:10:59 AEST
closing resolved bugs as of 8.6p1 release