Hi.
Am facing some authentication issues when i run ansible all -m win_ping. Response - 10.67.104.45 | UNREACHABLE! => {
“changed”: false,
“msg”: “basic: the specified credentials were rejected by the server”,
“unreachable”: true
}
The user which am trying to connect is administrator user. I followed some steps to add user and change the permissions using
winrm configSDDL default, but no luck.
Am using basic authentication.
Am new to Linux , i would appreciate if i get any help on this.
Setting the execution policy or firewall is unrelated to authentication failures. If you really want to use Basic auth make sure you have run the following to enable it on the WIndows host;
You can verify what have been enabled and disabled by running ‘winrm get winrm/config/service’. By default Basic auth is not enabled for security reasons.
I forgot to mention that running over http (like you are) for basic auth will only work if you have disabled message encryption on the Windows host. Do not do this, do something sane like running over https or use an authentication option that supports message encryption like Kerberos or NTLM.
Winrs error:The server certificate on the destination computer (10.67.104.45:5986) has the following errors:
The SSL certificate is signed by an unknown certificate authority.
The SSL certificate contains a common name (CN) that does not match the hostname.
Winrs error:The server certificate on the destination computer (10.67.104.45:5986) has the following errors:
The SSL certificate is signed by an unknown certificate authority.
The SSL certificate contains a common name (CN) that does not match the hostname.
How to connect windows client without using user name and password, in linux we can have certificate for password less authentication. How can i achieve the same with windows client?
After seeing your suggestion, tried with Kerberos and NTLM
This is what i see
10.67.104.45 | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 51: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/root/.ansible/cp/966bc611a0" does not exist\r\ndebug2: resolving "10.67.104.45" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to 10.67.104.45 [10.67.104.45] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: connect to address 10.67.104.45 port 22: Connection timed out\r\nssh: connect to host 10.67.104.45 port 22: Connection timed out\r\n”,
“unreachable”: true
}
I must be missing something, please guide me where exactly going wrong.