Support > Forums > OpenBots Studio > SFTP connection error
Error: FTP Create Session Type: 'IOException', Message: 'Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond..']
I can access the connection from WinSCP, which is a SFTP connection, but I am unable to connect with OpenBots , where all my credentials are accurate. It is a asymmetric key type of encrypted keys I have. Is there any possible way to connect?
This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...
Hi Irshad Ahamed,
As an alternative, you could invoke a c# code snippet to stablish the SFTP session and perform the actions needed. This can be done by using the Evaluate Snippet command.
For example, you can use the SSH.Net library. See sample below:
Install it as a dependency from package manager
and add the library dependency to the project
Use Evaluate Snippet to invoke c# snippet. The snippet below stablishes an SFTP session, and download a file from SFTP.
using (var sftp = new SftpClient(vHost, vPort, vUser, new System.Net.NetworkCredential("",vPassword).Password)) { sftp.Connect();
using (Stream fileStream = File.Create(ProjectPath + @"\Test.txt"))
{
sftp.DownloadFile("/TestFTPFolder/Test.txt", fileStream); //Sample to download a file
}
sftp.Disconnect();
}
You are not authorized to reply, please click here to login and add your reply to this topic.