Dear OpenSSH developers. I just found out that end-of-line comments, e.g. AllowUser foo #bar baz seem to work in sshd_config, but they don't in ssh_config. Having them in the later gives some error like: $ ssh host /etc/ssh/ssh_config line 23: garbage at end of line; "#bar". In fact there seems to be code to search for left-over config line content in both, the parsers for ssh_config and sshd_config, it only seems to work for the former. While it would be *very* nice to have end-of-line comments, there may be a bug hidden somewhere in servconf.c, that end-of-line comments ("the garbage") aren't noted in sshd_config. Regards, Philippe
Created attachment 2519 [details] Strip comments from ssh config files
Created attachment 3460 [details] Strip comments from ssh config files Update patch to -current
Patch has been applied and will be in the 8.5 release. Thanks for the report.
close bugs that were resolved in OpenSSH 8.5 release cycle