plink选美无法从asp.net工作 [英] plink pageant not working from asp.net

查看:65
本文介绍了plink选美无法从asp.net工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

正在执行的命令:"C:\ Program Files(x86)\ PuTTY \ plink.exe"-批处理abc @ xyz ./fake_email.sh

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

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

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.

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

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?

感谢您的帮助.

推荐答案

解决了它.

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

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).

这篇关于plink选美无法从asp.net工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆