我在远程计算机上加密/解密时遇到一些问题。例如:当我运行以下命令时,我收到以下错误。
有谁知道如何解决这个问题?
[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
的问候, naresh
答案 0 :(得分:2)
你可以看看Bruce Payette精美书中第13章的Forwarding credentials in multihop environments。
您可能需要CredSSP机制,使您能够通过可信中介将您的凭据安全地传递到目标计算机。