Bug 2891 - authorized_keys does not accept RFC4716 format
Summary: authorized_keys does not accept RFC4716 format
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 7.7p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-01 04:14 AEST by openssh
Modified: 2021-04-23 14:58 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 openssh 2018-08-01 04:14:34 AEST
I copied a public key in RFC4716 format into the authorized_keys file:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20180731"
AAAAB3NzaC1yc2EAAAABJQAAAQEAkpDfVicjGj3lD+G73nU9IvTEZXrS9ckH1RKH
i1OfzqGjYF1EX6+8cMUc3pL+y0uKIIU1M+e9yDCrUSlWUIP8KSx0ng7G76yopN8J
F0mQFvmV6X8cyEmuZ0NhLXXZ2bJ/mgRgWEb1jF3jj1UMiR7/SO0knGpgO2S8EZxj
aFyDRcRzFfjj9KBcFgcTcaRAkamNz1ZUMdupb7Yk2f8tR3s6H1jONWRk3s0Gpfdf
yyd+KMLDZwR/ie5wZHl9SRZ5Z8sGOhpERaauJuhC5rz+Go3zq0TuWdkCr6QsRv3w
JPn70onI5LfS1dijS3du+SXz7RWifFj0rsOJKk3Z9MrBoDUnZw==
---- END SSH2 PUBLIC KEY ----

but ssh did not recognize this format when attempting to log in. Only when I changed it to OpenSSH's single line format did it work:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkpDfVicjGj3lD+G73nU9IvTEZXrS9ckH1RKHi1OfzqGjYF1EX6+8cMUc3pL+y0uKIIU1M+e9yDCrUSlWUIP8KSx0ng7G76yopN8JF0mQFvmV6X8cyEmuZ0NhLXXZ2bJ/mgRgWEb1jF3jj1UMiR7/SO0knGpgO2S8EZxjaFyDRcRzFfjj9KBcFgcTcaRAkamNz1ZUMdupb7Yk2f8tR3s6H1jONWRk3s0Gpfdfyyd+KMLDZwR/ie5wZHl9SRZ5Z8sGOhpERaauJuhC5rz+Go3zq0TuWdkCr6QsRv3wJPn70onI5LfS1dijS3du+SXz7RWifFj0rsOJKk3Z9MrBoDUnZw==

I think OpenSSH should support the use of the RFC4716 format in the authorized_keys file.
Comment 1 Damien Miller 2018-08-01 08:30:12 AEST
Sorry, we have no desire to change the authorized_keys format. RFC4716 is more cumbersome and incompatible with the way we handle key options.

ssh-keygen can be used to convert RFC4716 to our format, but we're not going to include it in authorized_keys.
Comment 2 Damien Miller 2021-04-23 14:58:52 AEST
closing resolved bugs as of 8.6p1 release