Hi
I checked the previous messages for this error - the server definitely appears to be SFTP. I have been given a hostname, username and privatekey file, however I don't get past the the Connect() method...
Initially it appeared frozen, but this was due to:
Settings.WaitForServerWelcomeMessage = true;
.. now the error is as per the below log:
2020-07-07 13:44:31.183 Opening log file.
2020-07-07 13:44:31.185 INFO FileLogWriter(1)[1] Info: Assembly: Rebex.Common 2019 R1 for .NET 4.0-4.7
2020-07-07 13:44:31.188 INFO FileLogWriter(1)[1] Info: Platform: Windows 6.2.9200 64-bit; CLR: 4.0.30319.42000
2020-07-07 13:44:31.189 DEBUG FileLogWriter(1)[1] Info: Culture: en; Windows-1252
2020-07-07 13:44:35.696 INFO Sftp(1)[1] Info: Connecting to [serverprefix].upload.akamai.com:22 using Sftp.
2020-07-07 13:44:35.697 INFO Sftp(1)[1] Info: Assembly: Rebex.Sftp 2019 R1 for .NET 4.0-4.7
2020-07-07 13:44:35.697 INFO Sftp(1)[1] Info: Platform: Windows 6.2.9200 64-bit; CLR: 4.0.30319.42000
2020-07-07 13:44:35.697 DEBUG Sftp(1)[1] Info: Culture: en; Windows-1252
2020-07-07 13:44:35.711 DEBUG Sftp(1)[1] Proxy: Resolving '[serverprefix].upload.akamai.com'.
2020-07-07 13:44:35.723 DEBUG Sftp(1)[1] Proxy: Connecting to 23.64.137.133:22 (no proxy).
2020-07-07 13:44:35.852 VERBOSE Sftp(1)[1] SSH: Sending data:
0000 |53-53-48-2D-32-2E-30-2D 52-65-62-65-78-53-53-48| SSH-2.0-RebexSSH
0010 |5F-35-2E-30-2E-37-30-32 37-2E-30-0D-0A | _5.0.7027.0..
2020-07-07 13:45:00.179 ERROR Sftp(1)[1] SSH: Rebex.Net.SshException: The connection was closed by the server. Make sure you are connecting to an SSH or SFTP server.
at Rebex.Net.SshSession.nxja()
at Rebex.Net.SshSession.Negotiate()
2020-07-07 13:45:00.183 ERROR Sftp(1)[1] Info: Rebex.Net.SshException: The connection was closed by the server. Make sure you are connecting to an SSH or SFTP server.
at Rebex.Net.SshSession.nxja()
at Rebex.Net.SshSession.Negotiate()
at Rebex.Net.Sftp.mosg.krod(oiok alr, Boolean als)
at Rebex.Net.Sftp.jlvf(String po, Int32 pp, SshParameters pq, oiok pr)
My login code is:
_FtpClient.Connect(hostname); <- exception raised here
if (privateKey != null) {
_FtpClient.Login(username, privateKey);
} else {
_FtpClient.Login(username, password);
}
Please let me know if you need any other details.