Ssh connectivity issues from a Debian core server to a remote Windows 10 Pro host.

Hello how are you, I am trying to connect remotely via ssh to a remote Windows 10 Pro host, I apply the ad-hoc command and the only remote host that does not respond is the one with Windows 10 Pro installed, I attach the connectivity error, and I attach my inventory.yml file, I would appreciate your guidance.

Did you follow https://docs.ansible.com/ansible/latest/os_guide/windows_setup.html#windows-ssh-setup ?

Dear, thank you for answering, I already did all those steps, and it keeps throwing me the same error.
Using the ssh command administrator@192.168.x.x I can connect directly without any problem, I have it configured so that it does not ask me for a password when making the ssh connection, the problem happens when I apply any ansible ad-hoc command For example ansible -i inventory -m ping all, or when I apply a playbook, I attach a file with the ssh connection directly to the Windows 10 machine from a centralized Debian server, I would appreciate your guidance.

(attachments)

Hi

Login to your control machine with the user you control.
1 . Generate the ssh key using ssh keygen.

ssh keygen

  1. Copy the pub key to the same user where you created the key.
    Ex : #ssh-copy-id admistrator@
  2. Try the adhoc command
    Ex: ansible -i inventory -m ping

Read the ansible doc carefully again.

Based on your screenshot you didn’t define ansible_shell_type for the Windows hosts as per the guide. This is crucial for getting ssh to work with Windows as it must match the remote shell that’s being used, in your case that’s powershell.

I already did the generation of the public key, then I copied it to the host that has Windows Pro, I did all these steps to the letter, in the inventory.yml file I also made the corresponding changes, based on the help of ansible- doc, but now it throws me a totally different error, I don’t really know what it is, I am attaching the corresponding files, I would appreciate your help.

(attachments)


I already did the generation of the public key, then I copied it to the host that has Windows Pro, I did all these steps to the letter, in the inventory.yml file I also made the corresponding changes, based on the help of ansible- doc, but now it throws me a totally different error, I don't really know what it is, I am attaching the corresponding files, I would appreciate your help.

"ping" is not your friend" for validating SSH access. Ping relies on
ICMP packets, which are often blocked by firewalls. "ssh-keyscan" is
your friend, especially since it will validate hostkey compatibility.
Obsolete versions of OpenSSH, such as those hosted by Microsoft's
DevOps git servers, do not provide hostkeys with contemporary
protocols. So it's worth checking that your SSH client is compatible
with your SSH server setup, especially if the SSH server is on
something as old as Windows 10.

Also python 2.7 is *way, way, way* out of date for ansible, and should
be updated to Python 3 ASAP.

Literally set ansible_shell_type=powershell for your Windows hosts. It’s what’s in the docs you were linked to.