Bug 819896 - host-based ssh authentication does not work because sshd-keygen does not set group readable bit on host keys to enable ssh-keysign to read them
Summary: host-based ssh authentication does not work because sshd-keygen does not set ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 19
Hardware: All
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-08 14:30 UTC by Andrew J. Schorr
Modified: 2013-04-17 06:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-17 06:56:43 UTC
Type: Bug


Attachments (Terms of Use)
Enable group read on ssh host keys (1.07 KB, application/octet-stream)
2012-05-08 14:30 UTC, Andrew J. Schorr
no flags Details

Description Andrew J. Schorr 2012-05-08 14:30:01 UTC
Created attachment 583009 [details]
Enable group read on ssh host keys

Description of problem: The /usr/libexec/openssh/ssh-keysign is setgid, not setuid as it used to be.  The group is set to ssh_keys.  In the /usr/sbin/sshd-keygen script, the keys are created with the group set to ssh_keys, but the group read bit is disabled.  Thus, only root can read the keys, and host-based authentication does not work.


Version-Release number of selected component (if applicable):
openssh-5.9p1-22.fc17.src.rpm

How reproducible:  Try to use host-based authentication.  You get an error like this:

could not open any host key
ssh_keysign: no reply
key_sign failed
Permission denied (publickey,hostbased)


Steps to Reproduce:
1. Install Fedora.
2. Look at permissions on /etc/ssh/ssh_host_*key
3.
  
Actual results:
bash-4.2$ ls -l /etc/ssh/ssh_host_*key
-rw------- 1 root ssh_keys  668 May  7 15:22 /etc/ssh/ssh_host_dsa_key
-rw------- 1 root ssh_keys  965 May  7 15:22 /etc/ssh/ssh_host_key
-rw------- 1 root ssh_keys 1679 May  7 15:22 /etc/ssh/ssh_host_rsa_key


Expected results:
bash-4.2$ ls -l /etc/ssh/ssh_host_*key
-rw-r----- 1 root ssh_keys  668 May  7 15:22 /etc/ssh/ssh_host_dsa_key
-rw-r----- 1 root ssh_keys  965 May  7 15:22 /etc/ssh/ssh_host_key
-rw-r----- 1 root ssh_keys 1679 May  7 15:22 /etc/ssh/ssh_host_rsa_key



Additional info:

Comment 1 Petr Lautrbach 2012-05-09 12:00:25 UTC
Given that openssh package is built with openssh-5.8p1-keyperm.patch, which enables key files owned by ssh_keys group with 0640 permissions, I've reverted 81da99ed9bb19f029edfb92f6a8839886777db49 in git. 

Thanks for the report.

Comment 2 Fedora End Of Life 2013-04-03 20:30:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19


Note You need to log in before you can comment on or make changes to this bug.