Bug 508584 - ssh-copy-id doesn't seem to set correct selinux permissions
ssh-copy-id doesn't seem to set correct selinux permissions
Product: Fedora
Classification: Fedora
Component: openssh (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan F. Chadima
Fedora Extras Quality Assurance
: 509138 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2009-06-28 16:20 EDT by Kevin Fenzi
Modified: 2009-07-02 09:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-30 07:10:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kevin Fenzi 2009-06-28 16:20:46 EDT
Using ssh-copy-id to copy a ssh key to a new f11 host that has selinux enabled, the authorized_keys file is created on the remote host with an incorrect context. 

If you login and restorecon -Rv the .ssh directory you can use the key and login. 

[root@revan ~]# ls -laZ .ssh
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

[root@revan ~]# restorecon -Rv .ssh
restorecon reset .ssh context unconfined_u:object_r:admin_home_t:s0->system_u:object_r:home_ssh_t:s0
restorecon reset .ssh/authorized_keys context unconfined_u:object_r:admin_home_t:s0->system_u:object_r:home_ssh_t:s0
Comment 1 Jan F. Chadima 2009-07-02 09:23:57 EDT
*** Bug 509138 has been marked as a duplicate of this bug. ***

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