I am using Tectia as SFTP client in my .NET. Unfortunately Tectia does not provide API for .NET for SFTP process.
I am running the below script from 3 places. I am using System.Diagnostics.Process
to run the following. something like:
Process newProcess = new Process();
newProcess.StartInfo.FileName = "sftpg3";
newProcess.StartInfo.Arguments = "sftpg3 -K "C:\publicKey.com" -B "F:\FileToExecute.txt" TESTAO@sp01ftp"
One is from command line and another one is from my .Net webapplication(Hosted in IIS) and finally in .Net desktop application.
The script is working fine in command line and desktop application but NOT in web application. The return code is 4, which means the the connection to the remote SSH server didn't work.
All the above are running in the same machine where Tectia was installed.
sftpg3 -K "C:\publicKey.com" -B "F:\FileToExecute.txt" TESTAO@sp01ftp