Open maikgroenewegen opened 7 years ago
Also tried it in a PowerShell version (same error) and with the latest beta.
I have access to Azure, but I have to admit that I never used it. I'm afraid it'll take me ages to reproduce this issue. This may be a duplicate of issue #130, but without more info it's hard to tell.
I've you could let me know how to activate logging/debugging I might be able to get more detailed info.
You're right it is related to issue #130.I implemented the fix as mentioned in the other issue and my PowerShell version now works.
I changed line 109 in KeyExchangeDiffieHellman.cs to a fixed single number.
I'm try to connect to a SFTP server from an Azure Function and I keep getting a "Session operation has timed out". I'm on version "2016.0.0". I've build a similar function using WinSCP and that works fine and the same applies to running the CLI command SFTP from the Kudu prompt.
I'm using the following code:
public static void Run(TimerInfo myTimer, TraceWriter log) { string sftp_host =;
string sftp_user = ;
string sftp_privateKey = @
var stream = new FileStream(sftp_privateKey, FileMode.Open, FileAccess.Read);
var privateKeyFile = new PrivateKeyFile(stream);
AuthenticationMethod authenticationMethod = new PrivateKeyAuthenticationMethod(, privateKeyFile);
ConnectionInfo ConnNfo = new ConnectionInfo(sftp_host, sftp_user, authenticationMethod);
SftpClient client = new SftpClient(ConnNfo);
try
{
client.Connect();
}