Hi,

I am facing a similar issue.
I have non-root access to a server to which i am able to connect manually.
But ansible throws "to use the 'ssh' connection type with passwords, you 
must install the sshpass program" error when i execute the playbook.
My hosts file contains the ip address and credentials to login to that 
server in the below format
ip ansible_ssh_user="non-root-user" ansible_ssh_pass="password"

Is it necessary to install sshpass on the remote node as well??
I do not have root access, so how do i go about it?

Please suggest ASAP

Thanks in advance,
Mona G


On Saturday, October 12, 2013 at 12:38:55 AM UTC+5:30, Soumya Simanta wrote:
>
> If I do a normal ssh to the machine it works. 
> $ssh myhost 
> user@myhost's password: 
> Last login: Thu Oct 10 13:15:40 2013 from xxxxxxxx
>
>
> However when I do any of the following: 
>
> $ansible myhost -m ping -i ansibile_hosts -u myuserid 
> --private-key=~/.ssh/mykey_rsa --ask-pass -vvvv
>
> $ansible myhost -m ping -i ansibile_hosts -u myuserid --ask-pass -vvvv 
>
> this what I get, I'm using the same password as I used for my ssh login 
> above. 
>
> SSH password: 
> <x.x.x.x> ESTABLISH CONNECTION FOR USER: myuserid
> x.x.x.x | FAILED => to use the 'ssh' connection type with passwords, you 
> must install the sshpass program
>
> Do I really need sshpass for this work ? I'm on a OS-X (12.5.0 Darwin 
> Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; 
> root:xnu-2050.48.11~1/RELEASE_X86_64 x86_64) and looks like it's not easy 
> to install sshpass using port or brew. 
>
> Thanks. 
>
>
>
>
> On Friday, October 11, 2013 2:28:26 PM UTC-4, James Cammarata wrote:
>>
>> Could you please explain how they're not working? Using --ask-pass is the 
>> correct option to have Ansible prompt you for a password. If you're using 
>> SSH as your connection type (or "smart", on a system that is not 
>> RHEL/CentOS 6), you can also add -vvvv to get SSH debugging info printed 
>> out.
>>
>>
>> On Fri, Oct 11, 2013 at 9:52 AM, Soumya Simanta <[email protected]> 
>> wrote:
>>
>>> I'm new to Ansible.  I know I can add the ssh keys to the remote host(s) 
>>> and that works. But I was wondering if there is a way to do it without 
>>> sharing keys and just putting a password every time the Ansible playbook is 
>>> executed. 
>>>
>>> I tried the following and they don't work. 
>>>
>>> $ansible myhost -m ping -i ansibile_hosts -u myuserid 
>>> --private-key=~/.ssh/mykey_rsa --ask-pass
>>>
>>> $ansible myhost -m ping -i ansibile_hosts -u myuserid --ask-pass
>>>
>>> Thanks. 
>>> -Soumya
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>>
>> James Cammarata <[email protected]>
>> Sr. Software Engineer, AnsibleWorks, Inc.
>> http://www.ansibleworks.com/ 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c188ecd2-faba-407f-a4d7-4fce698c6763%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to