I can't ping the machine I set up with a vagrant from an executable.

Asked 5 months ago, Updated 5 months ago, 16 views

I started learning about the possible, but when I ran ansable all-i hosts-mping, the following error occurred and I couldn't proceed.

vagrant-machine | UNREACHABLE!=>{
    "msg": "Failed to connect to the host via ssh: connect to host port 22: Connection refused\r\n", 

vagrant ssh-config results are as follows

Host default
  User vagrant
  Port 2200
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityOnly yes
  LogLevel FATAL

Also, the hosts list is defined in the hosts file and written in one line as follows.

vagrant-machine available_host= available-port=2200 available_user=vagrant available_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key

Ansible.cfg is placed in the current directory and described as follows.


I don't see any extra line breaks in particularly.
Please let me know how to solve this problem.

vagrant ansible

2022-09-30 11:38

1 Answers

Based on the error content, it appears that an attempt to connect to has failed.

Host Listing Description




Isn't that a mistake?
(I think I'm trying to connect to the default number 22 because the port number specification is not working)

2022-09-30 11:38

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.