Ansible HTTPS连接错误的SSL版本

2024-06-16 10:41:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用credssp使用Ansible连接到我的windows 7计算机,收到的错误如下。在

tls_server_hello,wrong_ssl_version。在

然而,当我在我的Windows10机器上尝试同样的方法时,我可以成功


Tags: 方法机器sslhelloserverversionwindows计算机
2条回答

我也有过这样的问题,最后来到了这里。在

google让我相信这可能是因为windows主机上的第三方根证书可能被破坏了。是坏消息吗?是危险用户吗?谁知道呢!谁在乎!在

我执行了以下操作,解决了连接问题:

1)删除HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\Certificates

2)重启

没有更多的SSL错误版本错误

我的答案直接来自Ansible docs.问题是Windows7默认使用TLS1.0,但ansible需要TLS1.2。在

您可以测试WinRM使用openssl的版本,例如:

openssl s_client -connect your_win7_remote_host:5986

Protocol displayed has to be TLSv1.2. Follow the steps in link provided to create necessary registry keys and after restart it should work. That is:

Create entry DefaultSecureProtocols with value 0x00000800 (for TLSv1.2 only) or 0x00000A00 (for both TLSv1.1 and TLSv1.2) in keys 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp

and (for x64 machines)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp

Create entry DisabledByDefault with value 0 in key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server

相关问题 更多 >