Bug 496013 - /root/.ssh/authorized_keys not created with proper type
Summary: /root/.ssh/authorized_keys not created with proper type
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-15 23:49 UTC by Dax Kelson
Modified: 2009-05-01 18:05 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-05-01 18:05:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dax Kelson 2009-04-15 23:49:28 UTC
Description of problem:

I installed a rawhide box today (April 15th, 2009), I installed a authorized_keys file to /root/.ssh/authorized_keys and key based SSH authentication wouldn't work.

My installation procedure was:

(/root/.ssh/ directory already existed on the rawhide box)

anotherbox# cd /root/.ssh/
anotherbox# scp authorized_keys rawhidebox:.ssh/

Over on rawhide box here are the permissions and selinux type on the file:

[root@rawhidebox .ssh]# ls -alZ
drwx------. root root unconfined_u:object_r:admin_home_t:s0 .
drwxr-x---. root root system_u:object_r:admin_home_t:s0 ..
-rw-------. root root unconfined_u:object_r:admin_home_t:s0 authorized_keys
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 known_hosts
[root@rawhidebox .ssh]# 

Note that 'admin_home_t' on authorized_keys.

I'm unable to use key based auth until I run restorecon the authorized_keys file (which sets it to home_ssh_t).

Using scp to install an authorized_keys file is very typical. This needs to work.

Comment 1 Daniel Walsh 2009-05-01 18:05:25 UTC
Fixed in selinux-policy-3.6.12-23.fc11.noarch

Run restorecon -R -v /root after you create the directory or run restorecond


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