ssh as root using authorized_keys not working with SELINUX on a new install

Solution Verified - Updated -

Issue

In our environment we have one server that is the master server which can login to any server as root, using shared keys, which means we do not need to use a password as long as we're logged into this one management server as root. During the build we have a script that creates /root/.ssh/authorized_keys and we "cat" the key into that file, so in the end the new server knows to trust that server with the root key.

With SELinux enabled this feature does not work. If we disable SELinux we can use shared keys. I need help with a setting a policy during the build to allow this feature in our environment.

Environment

Red Hat Enterprise Linux (RHEL) 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.