Unable to do ssh

14 views
Skip to first unread message

subrat mangaraj

unread,
Jun 8, 2021, 2:54:49 AM6/8/21
to Ansible Project

Hello Team,

I am trying to connect and run few commands in destination hosts . In between destinatino hosts jump server there.

Can you help on this.

Ansible.cfg config

[defaults]:
inventory = /etc/ansible/hosts
ansible_python_interpreter=/usr/bin/python3
host_key_checking = no
look_for_keys = False


.ssh config
sh-3.2# cat /Users/veda/.ssh/config
Host tot
  Hostname x.x.x.x
  User veda1
  IdentityFile /Users/veda/.ssh/id_rsa
  IdentitiesOnly yes


[epc]
y.y.y.y

Hosts file
[test:vars]
ansible_connection=network_cli
use_persistent_connections=yes
ansible_port=22
ansible_ssh_port=22
ansible_network_os=ios
ansible_user=ravi
#ansible_ssh_user=ravi
#ansible_ssh_password=xxxx
ansible_password=xxxx

Getting this error
 "msg": "[Errno None] Unable to connect to port 22 on y.y.y.y" Looks like playbook trying to run root user

Reply all
Reply to author
Forward
0 new messages