首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用远程PSSession CredSSP时出现未知安全错误

使用远程PSSession CredSSP时出现未知安全错误
EN

Stack Overflow用户
提问于 2012-11-07 22:06:31
回答 2查看 7K关注 0票数 1

我在客户端安装了64位Windows7和Powershell2.0,并启用了CredSSP

代码语言:javascript
复制
Enable-WSManCredSSP -Role Client -DelegateComputer * -Force

打开Powershell控制台,执行Enter-PSSession命令,使用CredSSP身份验证连接Windows2008Server:

代码语言:javascript
复制
Enter-PSSession -Computername ServerMOSS -Authentication Credssp -Credential MyDomain\installerUser

我想远程执行Get-WSManCredSSP命令,但得到错误:"...当使用协商身份验证时:发生未知的安全错误。“

代码语言:javascript
复制
PS C:\Users\myUser> Enter-PSSession -Computername ServerMOSS -Authentication Credssp -Credential MyDomain\installerUser

[ServerMOSS]: PS C:\Users\installerUser\Documents> Get-WSManCredSSP

WinRM cannot process the request. The following error occured while using Negotiate authentication: An unknown security
 error occurred.
 Possible causes are:
  -The user name or password specified are invalid.
  -Kerberos is used when no authentication method and no user name are specified.
  -Kerberos accepts domain user names, but not local user names.
  -The Service Principal Name (SPN) for the remote computer name and port does not exist.
  -The client and remote computers are in different domains and there is no trust between the two domains.
 After checking for the above issues, try the following:
  -Check the Event Viewer for events related to authentication.
  -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or us
e HTTPS transport.
 Note that computers in the TrustedHosts list might not be authenticated.
   -For more information about WinRM configuration, run the following command: winrm help config.
    + CategoryInfo          :
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.GetWSManCredSSPCommand

[ServerMOSS]: PS C:\Users\installerUser\Documents> Exit-PSSession

IT部门在ServerMOSS中执行以下命令:

代码语言:javascript
复制
PS C:\Users\installerUser\Documents> enabled-psremoting -force

然后他们会得到错误:

代码语言:javascript
复制
WinRM already is set upt to receive requests on this machine
Set-WSManQuickConfig: WinRM cannot process the request. The following error occured while using Negotiate authentication: An unknown security error ocurred.

有什么建议吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-03-13 00:05:19

我也有同样的问题。我已经搜索了几次,发现检查/设置SPN可以解决这个问题:

所以试试这个:复习(只读)

代码语言:javascript
复制
setspn.exe -L MACHINENAME

查看HTTP/HTTPS条目(或任何重复条目)的结果

添加缺少的名称:

代码语言:javascript
复制
setspn -A HTTP/machinename
setspn -A HTTP/machinename.fqdn.com
setspn -A HTTPS/machinename
setspn -A HTTPS/machinename.fqdn.com

来源:WinRM QuickConfig failing with 0x8033809D

票数 1
EN

Stack Overflow用户

发布于 2016-07-05 19:57:54

这是因为HTTPS/HTTP条目未向SPN注册。只需以管理员身份执行以下打开Powershell:

使用以下命令检查SPN条目:

PS域名集setspn域名\服务器名

然后添加HTTP/HTTPS条目:

  1. PS C:> setspn -A HTTP/servername servername
  2. PS C:> setspn -A HTTP/servername.fqdn.com servername
  3. PS C:> setspn -A HTTPS/servername servername
  4. PS C:> setspn -A HTTPS/servername.fqdn.com servername

THen最后,您可以使用Enable- use在PowerShell提示符上删除-Force

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13271394

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档