On Thu, 9 May 2019 at 17:27, Michael Woods <[email protected]> wrote:
>
> Hello.
>
> I'm attempting to connect via Ansible to a remote linux based server. When I 
> attempt:
> ansible all -m ping -u <username>
>
> I receive the following errors:
>
> X.X.X.X | UNREACHABLE! => {
>
>
>     "changed": false,
>
>
>     "msg": "Failed to connect to the host via ssh: <username>@x.x.x.x: 
> Permission denied (publickey,password).",
>
>
>     "unreachable": true
>
>
> }
>
> (IP and username were discarded for confidentiality purposes.)
>
> I'm able to execute the command successfully if I use the --ask-pass option, 
> however; I was hoping to get it to automatically authorize PC machine via ssh 
> keys.
>
> On the Linux Server, I am able to see my PC's ssh key under: 
> '~/.ssh/authorized_keys'
>
> From my understanding, the server would need the ssh key of my PC for my PC 
> to authenticate with it? OR is it the other way around? My MAC-Book does not 
> have an authorized_keys file.

Hi
This isn't an ansible problem.
Take a look at some general SSH public key authentication pages, for instance:

https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwNsck%2BZhRQDJE9K_w25Q7r7TvfqjnYieEqhAzg%3DpG-uug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to