문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top