I am writing an automated uploader using Visual Studio 2010 and C#.
Using the code:
Sftp client = new Sftp();
client.LogWriter = new Rebex.FileLogWriter("c:\temp\log.txt", Rebex.LogLevel.Debug);
client.Connect("sftp.server.com");
client.Login(user, pass);
I can connect to the server using filezilla but not using rebex.
A "key exchange failed" exception is thrown. "No common algorithms".
Log file output below:
2012-01-19 12:57:40.197 Opening log file.
2012-01-19 12:57:40.889 INFO Sftp(1) Info: Connecting to sftp.server.com:22 using Sftp 2.0.4086.0 (trial version).
2012-01-19 12:57:41.383 DEBUG Sftp(1) SSH: Server is 'SSH-2.0-JSCAPE'.
2012-01-19 12:57:41.405 INFO Sftp(1) SSH: Negotiation started.
2012-01-19 12:57:41.681 DEBUG Sftp(1) SSH: Negotiating key.
2012-01-19 12:57:41.807 DEBUG Sftp(1) SSH: Negotiation failed: Rebex.Net.SshException:
Key exchange failed. Connection has been closed by the remote connection end; key exchange failed. No common algorithms. ---> Rebex.Net.SshException: Connection has been closed by the remote connection end; key exchange failed. No common algorithms.
at Rebex.Net.SshSession.cqLugQ(Byte[] , Int32 , Int32 )
at Rebex.Net.SshSession.AapcLiZ(Byte[] , Int32 , Int32 )
at Rebex.Net.SshSession.cDtmAOZ(cMbfbTZ , Object[] )
at Rebex.Net.SshSession.CFLiXJ(ANiLIV )
at wWGvS.miMck.ArwjUr(SshSession , Byte[] , Byte[] , Byte[] , Byte[] , Byte[]& , Byte[]& , Byte[]& )
at Rebex.Net.SshSession.ArwjUr(Byte[] )
--- End of inner exception stack trace ---
at Rebex.Net.SshSession.ArwjUr(Byte[] )