1

我在远程机器上加密/解密时遇到了一些问题。例如:当我运行以下命令时,出现以下错误。

谁能知道如何解决这个问题?

[remote machine]: PS C:\> Add-Type -assembly System.Security
[remote machine]: PS C:\> $passwordBytes = [System.Text.Encoding]::Unicode.GetBytes("Password!")
[remote machine]: PS C:\> $entropy = [byte[]](1,2,3,4,5)
[remote machine]: PS C:\> $encrytpedData = [System.Security.Cryptography.ProtectedData]::Protect($passw
ordBytes, $entropy, "CurrentUser")
Exception calling "Protect" with "3" argument(s): "The requested operation cannot be completed. The computer must be tr
usted for delegation and the current user account must be configured to allow delegation.
"
At line:1 char:71
+ $encrytpedData = [System.Security.Cryptography.ProtectedData]::Protect <<<< ($passwordBytes, $entropy, "CurrentUser")
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

问候, 纳雷什

4

1 回答 1

2

您可以查看Bruce Payette 好书第 13 章中的在多跳环境中转发凭据。

您可能需要 CredSSP 机制,该机制使您能够通过受信任的中介将您的凭据安全地传递给目标机器。

于 2012-07-20T04:06:37.717 回答