Re: [ansible-project] Permission Denied error

2021-09-03 Thread Antony Stone
On Friday 03 September 2021 at 07:31:14, aman kumar chagti wrote: > After - option, this coming up. any idea, what's going on?? I know the output below is terribly formatted for reading, but if you do look through it, you can see that everywhere it is trying to fetch a public key, it is

Re: [ansible-project] Permission Denied error

2021-09-03 Thread Antony Stone
On Thursday 02 September 2021 at 13:55:09, aman kumar chagti wrote: > when I try to run the playbook on a remote VM using password-based > authentication, I'm getting the following error Which user are you running the playbook as, on the machine running ansible? Antony. -- Police have found

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
-rw-r--r-- are permissions on file. nd ownership is root On Friday, September 3, 2021 at 8:33:23 PM UTC+5:30 Antony Stone wrote: > On Friday 03 September 2021 at 16:55:46, aman kumar chagti wrote: > > > this is my inventory file: > > > > X.X.X.X ansible_user=abc ansible_ssh_pass=xyz

Re: [ansible-project] Permission Denied error

2021-09-03 Thread Antony Stone
On Friday 03 September 2021 at 16:55:46, aman kumar chagti wrote: > this is my inventory file: > > X.X.X.X ansible_user=abc ansible_ssh_pass=xyz ansible_ssh_common_args='-o > StrictHostKeyChecking=no' > ansible_ssh_private_key_file=/home/dfc/.ssh/qmx/idk What are the ownership and permissions

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
this is my inventory file: X.X.X.X ansible_user=abc ansible_ssh_pass=xyz ansible_ssh_common_args='-o StrictHostKeyChecking=no' ansible_ssh_private_key_file=/home/dfc/.ssh/qmx/idk On Friday, September 3, 2021 at 8:18:59 PM UTC+5:30 jyle...@gmail.com wrote: > Hi, > > Look at your

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
yes, it's a sudoer user On Friday, September 3, 2021 at 8:16:52 PM UTC+5:30 e.ht...@gmail.com wrote: > OK for what you are saying. > Please check again if the ansible user on the target node is a sudoer user > as i suppose your playbook has tasks to be run in a privileged mode. > > On Fri, Sep

Re: [ansible-project] Permission Denied error

2021-09-03 Thread 'Jean-Yves LENHOF' via Ansible Project
Hi, Look at your /etc/ansible.cfg $HOME/.ansible.cfg in your home or your inventories files, you probably surcharge ansible_ssh_common_args somewhere ! Regards, Le 03/09/2021 à 16:43, aman kumar chagti a écrit : I'm manually able to log in to target VM by password...but no thru

Re: [ansible-project] Permission Denied error

2021-09-03 Thread elmustapha htioui
OK for what you are saying. Please check again if the ansible user on the target node is a sudoer user as i suppose your playbook has tasks to be run in a privileged mode. On Fri, Sep 3, 2021, 3:40 PM aman kumar chagti wrote: > PasswordAuthentication: is set to *yes*.. on both target and

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
I'm manually able to log in to target VM by password...but no thru ansible..even I tried to use the private key as well..but still the same issue coming up... On Friday, September 3, 2021 at 8:10:49 PM UTC+5:30 aman kumar chagti wrote: > PasswordAuthentication: is set to *yes*.. on both

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
PasswordAuthentication: is set to *yes*.. on both target and controller servers. FYI On Friday, September 3, 2021 at 8:08:50 PM UTC+5:30 aman kumar chagti wrote: > on the target server or on controller server?? > > On Friday, September 3, 2021 at 7:54:28 PM UTC+5:30 e.ht...@gmail.com > wrote:

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
on the target server or on controller server?? On Friday, September 3, 2021 at 7:54:28 PM UTC+5:30 e.ht...@gmail.com wrote: > Verify if PasswordAuthentication is set to yes in the /etc/ssh/sshd_config > and restart the sshd service on the managed node. > > On Fri, Sep 3, 2021, 3:07 PM aman

Re: [ansible-project] Permission Denied error

2021-09-03 Thread elmustapha htioui
Verify if PasswordAuthentication is set to yes in the /etc/ssh/sshd_config and restart the sshd service on the managed node. On Fri, Sep 3, 2021, 3:07 PM aman kumar chagti wrote: > hi, I used - option, and I found something > . > *SH: EXEC ssh -vvv -C -o ControlMaster=auto -o

Re: [ansible-project] Permission Denied error

2021-09-03 Thread Tej Singh Rana
This link will be helpful to understand how to enable password based authentication. https://docs.bitnami.com/virtual-machine/faq/get-started/enable-ssh-password/ On Fri, Sep 3, 2021 at 7:37 PM aman kumar chagti wrote: > hi, I used - option, and I found something > . > *SH: EXEC ssh -vvv

Re: [ansible-project] Permission Denied error

2021-09-03 Thread aman kumar chagti
hi, I used - option, and I found something . *SH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey *-o PasswordAuthentication=no* -o 'User="seconize"' -o

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
After - option, this coming up. any idea, what's going on?? fatal: [X.X.X.X]: UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n 7 Dec 2017\r\ndebug1: Reading configuration data

Re: [ansible-project] Permission Denied error

2021-09-02 Thread John Petro
Are you able to ssh from the control node to the client as that user? If so, does it fail, or are you able to log in. If you are able to log in, then you might have a problem with your ansible command syntax. Personally, when I run a playbook, I have to specify the user ( -u ) and I also have to

Re: [ansible-project] Permission Denied error

2021-09-02 Thread elmustapha htioui
Which inventory file do you use ? And try to run the playbook with - for debugging purposes. If you can share the output of the debugging command would be great ! On Thu, Sep 2, 2021, 3:04 PM aman kumar chagti wrote: > I tried these methods..same error coming up > > On Thursday, September

Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
The ssh test you made is using the ansible controller server ? Are you sure you are using the good ansible user on the target host ? (-u parameter for ansible-playbook) Regards, JY Le 02/09/2021 à 14:48, aman kumar chagti a écrit : yes, sshpass is inistalled On Thursday, September 2,

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
I tried these methods..same error coming up On Thursday, September 2, 2021 at 7:13:52 PM UTC+5:30 e.ht...@gmail.com wrote: > Hello, > From one side, when using become: yes, verify if the root password on the > managed nodes is the same as the controller, otherwise use -k and specify > the

Re: [ansible-project] Permission Denied error

2021-09-02 Thread elmustapha htioui
Hello, >From one side, when using become: yes, verify if the root password on the managed nodes is the same as the controller, otherwise use -k and specify the root managed node password. >From another side, when using a dedicated user for ansible, verify if that user exist and is a sudoer on the

Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
Le 02/09/2021 à 14:53, aman kumar chagti a écrit : @jyle if sshpass needs to be installed on target VM as well?? Nope, only on server side Regards, JYL -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
I've given privilege escalation in playbook i.e, *become: yes* On Thursday, September 2, 2021 at 6:22:29 PM UTC+5:30 aman kumar chagti wrote: > how to give privilege escalations? > > On Thursday, September 2, 2021 at 6:18:49 PM UTC+5:30 aman kumar chagti > wrote: > >> how to do that?? > > >>

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
@jyle if sshpass needs to be installed on target VM as well?? On Thursday, September 2, 2021 at 6:06:44 PM UTC+5:30 jyle...@gmail.com wrote: > If you want password authentication, you need sshpass on your ansible > controller server. Did you install it ? > > Regards, > > JYL > > > Le

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
how to give privilege escalations? On Thursday, September 2, 2021 at 6:18:49 PM UTC+5:30 aman kumar chagti wrote: > how to do that?? > > > On Thursday, September 2, 2021 at 5:59:48 PM UTC+5:30 > komalsuth...@gmail.com wrote: > >> Have you given privilege escalations try doing that. >> >> On

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
how to do that?? On Thursday, September 2, 2021 at 5:59:48 PM UTC+5:30 komalsuth...@gmail.com wrote: > Have you given privilege escalations try doing that. > > On Thu, Sep 2, 2021, 5:25 PM aman kumar chagti > wrote: > >> when I try to run the playbook on a remote VM using password-based >>

Re: [ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
yes, sshpass is inistalled On Thursday, September 2, 2021 at 6:06:44 PM UTC+5:30 jyle...@gmail.com wrote: > If you want password authentication, you need sshpass on your ansible > controller server. Did you install it ? > > Regards, > > JYL > > > Le 02/09/2021 à 13:55, aman kumar chagti a

Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
If you want password authentication, you need sshpass on your ansible controller server. Did you install it ? Regards, JYL Le 02/09/2021 à 13:55, aman kumar chagti a écrit : when I try to run the playbook on a remote VM using password-based  authentication, I'm getting the following error:

Re: [ansible-project] Permission Denied error

2021-09-02 Thread Komal Suthar
Have you given privilege escalations try doing that. On Thu, Sep 2, 2021, 5:25 PM aman kumar chagti wrote: > when I try to run the playbook on a remote VM using password-based > authentication, I'm getting the following error: > > *fatal: [X.X.X.X]: UNREACHABLE! => {"changed": false, "msg":

[ansible-project] Permission Denied error

2021-09-02 Thread aman kumar chagti
when I try to run the playbook on a remote VM using password-based authentication, I'm getting the following error: *fatal: [X.X.X.X]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: x...@X.X.X.X: Permission denied (publickey,password).", "unreachable":