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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content