Allowing private keys without a newline at the end

David Leadbeater dgl at dgl.cx
Thu Jul 24 12:01:45 AEST 2025


On Thu, 24 Jul 2025 at 10:56, Damien Miller <djm at mindrot.org> wrote:
[...]
> -----END OPENSSH PRIVATE KEY-----somejunkonthesameline

On the other hand:
-----END SSH SIGNATURE-----blah
...does work with ssh-keygen -Y verify currently (sshsig.c,
sshsig_dearmor). Which also supports CRLF format.

It might make sense to also support CRLF if relaxing this. Microsoft
has SUPPORT_CRLF[1] which could also lead to similar confusion.

David

[1]: https://github.com/PowerShell/openssh-portable/blob/latestw_all/sshkey.c
(also a change in auth2-pubkeyfile.c, auth_check_principals_line).


More information about the openssh-unix-dev mailing list