Powershell CREDSSP和TLS 1.2

时间:2018-05-24 15:25:36

标签: powershell ssl tls1.2 credssp

服务器A是Server 2008 R2,Powershell V3启用了所有SSL和TLS以及所有密码。 服务器B是Server 2016,Powershell V5和Only TlS 1.2以及特定的密码集。

即使我使用

,我也无法使用Credssp身份验证从A到B工作
Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

我知道这是一个每个会话设置所以我包含在脚本本身。

如果我将服务器B(服务器2016)设置为打开所有SSL和TLS加密,则CREDSSP没有问题。

是的,我需要使用CREDSSP,因为服务器B上的脚本在服务器A上引用文件共享。

这是我正在使用的脚本,再次,在启用所有版本的TLS时都可以使用。

$pass = ConvertTo-SecureString "password" -asplaintext -force
$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist "domain\user.service",$pass
#
#
# The Remote Execution Command. Fully Qualified Domain name is critical since we are using Credssp.
# Credssp is being used to resolve an issue with a double hop authentication issue. 
Invoke-Command -ComputerName ServerB.domain.edu -command { C:\HelloWorld.ps1 } -Authentication Credssp  -Credential $mycred

我还没有尝试过的一件事,但是我要将服务器A和B放在TLS 1.2上,看看它是否有效。这不是长期解决方案,因为此时服务器A无法设置为仅TLS 1.2。

1 个答案:

答案 0 :(得分:0)

所以看起来问题与Server 2008只有TLS的Server子项的注册表项有关,而不是SCHANNEL Reg设置的TLS的Client子项。见图片

一旦我添加了客户端子密钥并启用了TLS 1.2加密,它终于开始工作了。

setTimeout

相关问题