Hi Guille,

On 17.03.19 11:13, Guillermo Colmena wrote:
> I have been trying to configure the ssh.cfg and ansible.cfg to be able to 
> access using an id_rsa to connect via ssh to the remote servers. The 
> question comes when I try to configure these 2 config files. Any main steps 
> that are needed to take to make it work?
> 
> Files: 
> 
> - ssh.cfg

I guess you are talking about the ssh_config file. Since Ansible uses
the systems ssh client (OpenSSH most likely), the config file for ssh
has to be in a location OpenSSH is looking for it.

On Linux that'd be /etc/ssh/ssh_config for the system-wide config or
$HOME/.ssh/config for a single users config.

The $HOME/.ssh directory has to have 700 or rwx------ permissions.

In there you just specify

Host myhost.example.com
  IdentityFile /path/to/your/private/key

Afterwards the first thing you should check is, if normal ssh works as
expected.

> - ansible.cfg

You should not need to specify anything here. If you need to keep your
ssh_config in a location the systems SSH client wouldn't look for it,
you probably could add a

-F /path/to/your/ssh/config

to the ssh_args parameter.

HTH
Sebastian

-- 
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a5e141dc-1833-d520-393c-31071392bd6d%40b1-systems.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to