[英]Powershell CREDSSP and TLS 1.2
服务器A是Server 2008 R2,Powershell V3,所有SSL和TLS已启用以及所有密码。 服务器B是服务器2016,Powershell V5,仅Tls1.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。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.