Ansible .ssh/authorized.key

40 views
Skip to first unread message

Ryad karkar

unread,
Jun 27, 2019, 8:15:58 AM6/27/19
to Ansible Project
Hy all,

when i use become_user: wildfly

i have have this message error :

path /home/wildfly/.ssh/authorized_keys does not exist

But this path exist in destination host...

Someone have idea please ??!

Thanks community ansible for your help !! ;)

ansible version : 2.8

Regards,

Vandana Thakur

unread,
Jun 27, 2019, 8:18:41 AM6/27/19
to ansible...@googlegroups.com
May check permissions of authorized_keys

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b495f189-4576-4e3c-be88-de04b2a6674c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryad karkar

unread,
Jun 27, 2019, 8:32:54 AM6/27/19
to Ansible Project
Hy,

Thanks for your answer,
I look permission of authorized_keys but i use user wildfly of /home/wildfly/.ssh/authorized_keys
So the problem is not if there is permission or not ??

I use :

become_user: wildfly

Thanks for your help !!

Regards,


Le jeudi 27 juin 2019 14:18:41 UTC+2, new_ansible a écrit :
May check permissions of authorized_keys
On Thu, 27 Jun 2019 at 17:46, Ryad karkar <ryad9...@gmail.com> wrote:
Hy all,

when i use become_user: wildfly

i have have this message error :

path /home/wildfly/.ssh/authorized_keys does not exist

But this path exist in destination host...

Someone have idea please ??!

Thanks community ansible for your help !! ;)

ansible version : 2.8

Regards,

--
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 ansible...@googlegroups.com.

Ryad karkar

unread,
Jun 27, 2019, 8:55:42 AM6/27/19
to Ansible Project
Hy,

For answer, i have this permissions for authorized_keys with user wildfly :

-rw------- 1 wildfly wildfly 7445 Jun 27 12:05 authorized_keys

Thanks,

Regards,

Le jeudi 27 juin 2019 14:18:41 UTC+2, new_ansible a écrit :
May check permissions of authorized_keys
On Thu, 27 Jun 2019 at 17:46, Ryad karkar <ryad9...@gmail.com> wrote:
Hy all,

when i use become_user: wildfly

i have have this message error :

path /home/wildfly/.ssh/authorized_keys does not exist

But this path exist in destination host...

Someone have idea please ??!

Thanks community ansible for your help !! ;)

ansible version : 2.8

Regards,

--
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 ansible...@googlegroups.com.

P.Co...@bham.ac.uk

unread,
Jun 27, 2019, 9:12:19 AM6/27/19
to ansible...@googlegroups.com

Have you checked permissions on /home/wildfly/.ssh/ too? That needs to be 700 (rwx) – see eg below:

 

[root@<server>]# ls -ld /home/wildfly/.ssh

drwx------. 2 wildfly wildfly 4096 Jun  7 14:26 /home/ wildfly /.ssh

[root@<server>]#

 

Regards

Phil

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.


To post to this group, send email to ansible...@googlegroups.com.

Ryad karkar

unread,
Jun 27, 2019, 10:55:23 AM6/27/19
to Ansible Project
Hy,

I check it and all is ok but not works... When i changed permission 777 it's works.

I thinks that it's problem of user use ? but i have the well user ... with this command:

become_user: wildfly

Thinks,

Regards,

P.Co...@bham.ac.uk

unread,
Jun 27, 2019, 11:23:47 AM6/27/19
to ansible...@googlegroups.com

What task are you trying to perform eventually? If it’s something like adding a new package, you may need to connect with the normal wildfly user first and then become root. If so, something like similar might be more appropriate:

 

- name: Test

  hosts: all

  remote_user: wildfly

  become: yes

  become_method: sudo

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.


To post to this group, send email to ansible...@googlegroups.com.

Ryad karkar

unread,
Jun 27, 2019, 11:44:24 AM6/27/19
to Ansible Project
Hy,

Thank you very much for your help i have solve this problem.

Thanks for your help !! :)

Regards,

P.Co...@bham.ac.uk

unread,
Jun 27, 2019, 11:48:24 AM6/27/19
to ansible...@googlegroups.com

Did my suggestion work for you or did you resolve it in some other way?

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.


To post to this group, send email to ansible...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages