My “Ansible Server” connect to remote “Host” as below.
Ansible Server —> JumpServer → Host
I configured “Ansible Server” Appropriately for SSH Proxy. Now I can directly SSH to “Host” from “Ansible Server”, both with username/password and key.
When I copy public key of “Ansible Server” to “Host”, simple ping works fine with Ansible:
root@AnsibleServer:~/LogCollector# ansible 10.1.100.36 -i host_inventory -u root -m ping
10.1.100.36 | SUCCESS => {
“changed”: false,
“ping”: “pong”
}
Then I remove public key from the “Host” and tried same with password.
root@AnsibleServer:~/LogCollector# ansible 10.1.100.36 -i host_inventory -u root -m ping -k
SSH password: xxxxxxx
10.1.100.36 | UNREACHABLE! => {
“changed”: false,
“msg”: “Authentication failure.”,
“unreachable”: true
}
Any idea of what happens here.
Side Note:
I installed Ansible 2.2 manually downloading all deb packages in my “Ansible Server” (Ubuntu 14.04) because of high security in my client and we don’t have internet access form the “Ansible Server”. I wonder the above problem is because of some missing library. Following are all the packages I had to install manually.
ansible_2.2.0.0-1ppa~trusty_all.deb
libgmp10_2%3a5.1.3+dfsg-1ubuntu1_amd64.deb
libyaml-0-2_0.1.4-3ubuntu3.1_amd64.deb
python-crypto_2.6.1-4build1_amd64.deb
python-httplib2_0.8-2build1_all.deb
python-jinja2_2.7.2-2_all.deb
python-markupsafe_0.18-1build2_amd64.deb
python-paramiko_1.10.1-1git1build1_all.deb
python-setuptools_3.3-1ubuntu2_all.deb
python-yaml_3.10-4ubuntu0.1_amd64.deb
sshpass_1.05-1_amd64.deb
Many thanks…!!