服务器A是Server2008SSL,Powershell V3启用了所有R2和TLS,并且所有密码都已启用。服务器B是Server2016、Powershell V5和Only TlS 1.2以及一组特定的密码。
我无法让Credssp身份验证从A到B工作,即使我使用
Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12我知道这是针对每个会话的设置,因此我将其包含在脚本本身中。
如果我将服务器B (Server 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。
发布于 2018-05-26 00:20:35
因此,该问题看起来与Server2008有关,在SCHANNEL Reg设置上,只有TLS的Server子项的注册表项,而没有TLS的客户端子项。参看图片
添加客户端子密钥并启用TLS 1.2加密后,它终于开始工作了。

https://stackoverflow.com/questions/50513033
复制相似问题