Description of problem: SELinux is preventing /usr/bin/ssh from 'append' accesses on the file /root/.ssh/known_hosts. ***** Plugin catchall (100. confidence) suggests *************************** If sie denken, dass es ssh standardmässig erlaubt sein sollte, append Zugriff auf known_hosts file zu erhalten. Then sie sollten dies als Fehler melden. Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen. Do zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen: # grep ssh /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:mount_t:s0 Target Context unconfined_u:object_r:ssh_home_t:s0 Target Objects /root/.ssh/known_hosts [ file ] Source ssh Source Path /usr/bin/ssh Port <Unknown> Host (removed) Source RPM Packages openssh-clients-6.1p1-8.fc18.x86_64 Target RPM Packages Policy RPM selinux-policy-3.11.1-92.fc18.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.8.11-200.fc18.x86_64 #1 SMP Wed May 1 19:44:27 UTC 2013 x86_64 x86_64 Alert Count 1 First Seen 2013-05-17 13:55:03 CEST Last Seen 2013-05-17 13:55:03 CEST Local ID 88f7a77a-e722-464c-bbaa-b41c453069c8 Raw Audit Messages type=AVC msg=audit(1368791703.582:3069): avc: denied { append } for pid=24962 comm="ssh" name="known_hosts" dev="sda4" ino=786593 scontext=system_u:system_r:mount_t:s0 tcontext=unconfined_u:object_r:ssh_home_t:s0 tclass=file type=SYSCALL msg=audit(1368791703.582:3069): arch=x86_64 syscall=open success=no exit=EACCES a0=7fda64bac140 a1=441 a2=1b6 a3=238 items=0 ppid=1 pid=24962 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=ssh exe=/usr/bin/ssh subj=system_u:system_r:mount_t:s0 key=(null) Hash: ssh,mount_t,ssh_home_t,file,append audit2allow #============= mount_t ============== allow mount_t ssh_home_t:file append; audit2allow -R require { type mount_t; } #============= mount_t ============== ssh_manage_home_files(mount_t) Additional info: hashmarkername: setroubleshoot kernel: 3.8.11-200.fc18.x86_64 type: libreport
Were you mounting a sshfs file system? Why would ssh be running as mount_t?
I use autofs with fuse and sshfs to connect to another server. The automount process is running as root
d7900d40924d4874e999eaba96bd88378e5dce5e allows this in git.
Back ported.
selinux-policy-3.11.1-96.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-96.fc18
Package selinux-policy-3.11.1-96.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-96.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-8730/selinux-policy-3.11.1-96.fc18 then log in and leave karma (feedback).
selinux-policy-3.11.1-96.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.