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
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_configfile the PubkeyAuthentication is set to yes.
- Edit the
/etc/ssh/sshd_configfile in the affected client host to change the PubkeyAuthentication from no to yes.
# vi /etc/ssh/sshd_config
...
PubkeyAuthentication no <<<=== Change 'no' to 'yes'
- After modifying the file, restart the sshd services on the client host and initiate a remote execution job.
# systemctl restart sshd
-
Refer to the article 7135322 , if a similar error is observed on the
Red Hat Enterprise Linux 7host remote execution job. -
Reach out to the This content is not included.Red Hat Technical Support, if the issue still persists and further investigation is required.
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_configthat prevents the public key authentication even though the SSH key is being shared. When the PubkeyAuthentication is set tono, the SSH server does not allow users to authenticate using public key authentication.
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.