plink pageant not working from asp.net

余生颓废 提交于 2020-02-05 05:23:10

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/4313834/plink-pageant-not-working-from-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!