plink 选美无法在 ASP.NET 上运行

发布于 2024-10-05 08:16:03 字数 409 浏览 0 评论 0原文

简而言之,问题是: 运行 plink(带有特定参数)可以从 cmd 运行,但不能从 asp.net

执行的命令运行: 来自 cmd 的"C:\Program Files (x86)\PuTTY\plink.exe" -batch abc@xyz ./fake_email.sh

,命令正确执行,fake_email.sh 返回“0”。从 asp.net 我收到以下错误: 服务器的主机密钥未缓存在注册表中。你 无法保证服务器就是您的计算机 我认为是的。 服务器的 rsa2 密钥指纹是: ssh-rsa 2048 序列 连接已放弃。

我认为这与用户(.net 用于启动进程)无法“看到”选美比赛提供的密钥有关。我正在以管理员身份运行cmd。

我很高兴发布更多信息。

谁能指出我正确的方向?

感谢您的帮助。

the problem in a nutshell:
running plink(with specific arguments) works from cmd, but not from asp.net

the command being executed:
"C:\Program Files (x86)\PuTTY\plink.exe" -batch abc@xyz ./fake_email.sh

from cmd, the command executes correctly, with fake_email.sh returning "0". from asp.net i get the following error:
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 sequence
Connection abandoned.

i think it has something to do with the user(which .net uses to start a process) not being able to "see" the key which pageant is making available. i am running cmd as administrator.

i am happy to post more info.

can anyone point me in the right direction?

thanks for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凤舞天涯 2024-10-12 08:16:03

解决了它。

默认情况下,asp.net 以“NetworkService”用户身份执行进程。我无法缓存该用户的密钥,因此我决定创建一个新用户,并将其分配为 IIS 中应用程序池的标识。因为我创建了这个用户,所以我能够在注册表中缓存该密钥(仅使用 cmd)。

solved it.

asp.net by default executes processes as "NetworkService" user. i was unable to cache the key for that user, so i decided to create a new user, which i assign as the identity of the application pool in IIS. because i created this user, i am able to cache the key in the registry (just using cmd).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文