ssh connectivity issue AWX 2.1.0

Hi Team,

I am facing some weird issue.

Issue:
I installed AWX 2.1.0 standalone.
I configured passwordless login to target host
Verified by login into the target host from command line.

We are setting up dynamic entries to execute the playbook and when we execute the playbook from AWX it reports below error message.

TASK [Gathering Facts] *********************************************************
11:35:09

50
fatal: [hostvm1.domain.net]: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\n”, “unreachable”: true}

51
fatal: [hostvm2.domain.net]: UNREACHABLE! => {“changed”: false, “msg”: "Failed to connect to the host via ssh: |-----------------------------------------------------------------|\n| This system is for the use of authorized users only. |\n| Individuals using this computer system without authority, or in |\n| excess of their authority, are subject to having all of their |\n| activities on this system monitored and recorded by system |\n| personnel. |\n| |\n| In the course of monitoring individuals improperly using this |\n| system, or in the course of system maintenance, the activities |\n| of authorized users may also be monitored. |\n| |\n| Anyone using this system expressly consents to such monitoring |\n| and is advised that if such monitoring reveals possible

I don’t know what’s going on. Any help will be much appreciated.

It looks like your ssh credential may be incorrect… that’s the takeaway I get with the ssh permission denied.

I would take the exact same set of credentials and try them from the command line doing a simple SSH from the AWX host and/or just regular command line Ansible. If that does not present a smoking gun, I take a look at applicable login logs (ie. /var/log/secure) from the client server and see exactly why I am getting the shaft.

J. Foley

Library of Congress

Thank you Team for the help.

I added the id_rsa and id_rsa.pub to awx home directory and gave the required permission and things were fixed.

I would say this is probably not the solution you should go with and suggests that you are using the wrong credentials in AWX to communicate with the remote host.

As far as credentials is concern, we are using the correct one to communicate to remote host. we don’t want to create another AWX user to this task as we already have user for such operation.

Please suggest how to go about it.

On the remote system you are hoping to manage, you’ll have a user over there and (I assume) an ssh key.

On the AWX system you’ll create a new machine credential using the private key of that remote user and in the credential you’ll also populate the username field for that remote user.

When you create a job template or ad-hoc job you can then select that credential to be used for the job.

Thank you Matthew, will follow your suggestion.