Remote execution job failed with "Error initializing command: RuntimeError - Could not establish connection to remote host using any available authentication method, tried publickey" in Red Hat Satellite 6

Solution Verified - Updated

Environment

  • Red Hat Satellite 6
  • Red Hat Capsule 6

Issue

  • The remote execution job failed with the following error when the client host registered to the Red Hat Satellite or Capsule 6.

      Error initializing command: RuntimeError - Could not establish connection to remote host using any available authentication method, tried publickey
    
    

Resolution

  • Ensure in the affected client host in /etc/ssh/sshd_config file the PubkeyAuthentication is set to yes.
  1. Edit the /etc/ssh/sshd_config file in the affected client host to change the PubkeyAuthentication from no to yes.
# vi /etc/ssh/sshd_config
 ...
 
  PubkeyAuthentication no        <<<=== Change 'no' to 'yes'
  1. After modifying the file, restart the sshd services on the client host and initiate a remote execution job.
 # systemctl restart sshd 

 

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

  • In the affected client host, the hardening parameter is applied in /etc/ssh/sshd_config that prevents the public key authentication even though the SSH key is being shared. When the PubkeyAuthentication is set to no, the SSH server does not allow users to authenticate using public key authentication.
SBR
Product(s)
Category

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.