Remote execution fails with "Authentication failed for user root@client_hostname" even though keys are correctly copied

Solution Unverified - Updated

Environment

Red Hat Satellite 6.3

Issue

Remote execution on RHEL clients is failing with

Error initializing command: Net::SSH::AuthenticationFailed - Authentication failed for user root@client_hostname
Exit status: EXCEPTION

even though the keys were copied.

Resolution

Check the non-working clients whether they are assigned to a subnet (they should be), or whether the subnet they are assigned to is managed by a capsule that supports Remote Execution.

For more KB articles/solutions related to Red Hat Satellite 6.x Remote Execution Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Remote Execution Issues

Root Cause

This issue is caused by This content is not included.this Bugzilla

Diagnostic Steps

  • Error message in Remote Execution task:
Error initializing command: Net::SSH::AuthenticationFailed - Authentication failed for user root@client_hostname
Exit status: EXCEPTION
  • In client's /var/log/secure logs:
client sshd[10763]: Connection closed by xxx.xxx.xxx.xxx port 57590 [preauth]
  • In Satellite's settings (Administer -> Settings -> Remote Execution), the remote_execution_without_proxy is set on Yes.
SBR
Product(s)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.