5

He estado luchando para tratar con winrm y TrustedHosts, pero fue en vano. Después de experimentar un poco, descubrí que este campo de winrm/config/client está limitado a 1023 símbolos, lo que no es suficiente, especialmente si se agregan hosts por su ipv6. cito de Installation and Configuration for Windows Remote Management: A trusted hosts list should be set up when mutual authentication cannot be established.Conectarse al servidor remoto usando winrm sin agregar el servidor a TrustedHosts

También en el mismo archivo que el texto dice: Other computers in a workgroup or computers in a different domain should be added to this list. Así que pensé que esto implica que, siempre y cuando dos equipos están en el mismo dominio, debería ser capaz de acceder a uno de ellos de la otro usando winrm.

He intentado añadir dos equipos a un dominio de prueba y la ejecutados:

winrm get winrm/config/client -r:192.168.100.1 -u:user -p:pass

De uno de ellos al otro, pero esto falló con el error:

WSManFault 
    Message = The WinRM client cannot process the request. If the authentication 
scheme is different from Kerberos, or if the client computer is not joined to a 
domain, then HTTPS transport must be used or the destination machine must be ad 
ded to the TrustedHosts configuration setting. Use winrm.cmd to configure Truste 
dHosts. You can get more information about that by running the following command 
: winrm help config. 

Error number: -2144108316 0x803380E4 
The WinRM client cannot process the request. If the authentication scheme is dif 
ferent from Kerberos, or if the client computer is not joined to a domain, then 
HTTPS transport must be used or the destination machine must be added to the Tru 
stedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. You ca 
n get more information about that by running the following command: winrm help c 
onfig. 

Después de añadir 192.168 .100.1 a TrustedHosts la consulta anterior tiene éxito. Entonces mi pregunta es: ¿es posible usar winrm entre dos hosts sin modificar TrustedHosts? Establecer hosts de confianza en * no es una opción para mí.

Respuesta

10

Si ambas máquinas están en el mismo dominio, debería poder usar ComputerName en lugar de la dirección IP. Cuando utilizas la dirección IP, casi te veo forzado a usar TrustedHosts por lo que he visto.

+2

Disculpe la demora. Puede ser divertido, pero no pude encontrarlo mencionado en ninguna parte de la web que si usa ComputerName no necesita agregar nada a TrustedHosts. Pero verifiqué que funciona :) –

Cuestiones relacionadas