Bug 1405158
| Summary: | We need /etc/ssh/sshd_config to support multiple files in the AuthorizedKeysFile line, and for sshd to use them in both RHEL 5 and RHEL 6 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Greg Scott <gscott> |
| Component: | openssh | Assignee: | Jakub Jelen <jjelen> |
| Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 6.8 | CC: | bpowers, gscott, phillip.jaenke.nonemployee |
| Target Milestone: | rc | ||
| Target Release: | 6.9 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-17 16:27:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Greg Scott
2016-12-15 17:38:18 UTC
I have been able to confirm that the issue of not reading .ssh/authorized_keys2 when AuthorizedKeysFile is not explicitly set does NOT reproduce with openssh-server-5.3p1-104.el6.x86_64, but DOES occur with openssh-server-5.3p1-94.el6.x86_64 and below. This behavior also occurs in 4.3p2-82 in an intermittent fashion, indicating the issue may have been introduced some time ago. I did some more testing with openssh-server-5.3p1-118.1.el6_8.x86_64. This version does not support multiple files in the AuthorizedKeysFile line of /etc/ssh/sshd_config, but it does appear to support the desired default behavior. First, a baseline test: On my RHEL6 test ssh server - [root@rhel6test ssh]# cd /root/.ssh [root@rhel6test .ssh]# ls authorized_keys known_hosts And from this laptop - no password prompt, as expected: [gscott@gscott]$ [gscott@gscott]$ ssh root.10.125 Last login: Thu Dec 15 12:39:08 2016 from 10.10.10.121 [root@rhel6test ~]# logout Connection to 10.10.10.125 closed. Now a test using .sshh/authorized_keys2 on the ssh server - [root@rhel6test .ssh]# mv authorized_keys authorized_keys2 [root@rhel6test .ssh]# service sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ] [root@rhel6test .ssh]# ls authorized_keys2 known_hosts And from my ssh client on this laptop - password-less, as expected: [gscott@gscott]$ ssh root.10.125 Last login: Thu Dec 15 12:39:56 2016 from 10.10.10.121 [root@rhel6test ~]# logout Connection to 10.10.10.125 closed. So far so good. This next test should prompt for a password. On the server - [root@rhel6test .ssh]# mv authorized_keys2 authorized_keysgreg [root@rhel6test .ssh]# And from the client - I do have to enter a password, as expected. [gscott@gscott]$ ssh root.10.125 root.10.125's password: Last login: Thu Dec 15 12:39:25 2016 from 10.10.10.121 [root@rhel6test ~]# logout Connection to 10.10.10.125 closed. So the big deal is to support multiple files in /etc/ssh/sshd_config. I'll update the title to reflect this. - Greg Closing. We will not fix this feature request in RHEL6.9 and copying out the possible solutions to the "problem": Manual page for sshd_config in RHEL6 explicitly states that AuthorizedKeysFile accepts single argument with the file. * As an workaround, there is AuthorizedKeysFile2 with its default value ".ssh/authorized_keys2", which is used as the second file (undocumented, works fine as you pointed out). * The other workaround that can be used is a wrapper script in AuthorizedKeysCommand, that can internally read as much files as you want. |