0 votes
by (150 points)
edited

Dear Sir,

I am using the Rebex Sample, WinFormClient_VB, to try in establishing an SFTP connection to a Tumbleweed SFTP Server, and I faced the error message of:

'Info Info: Connecting to 10.14.19.241:22 using Sftp 2.0.3793.0. Error SSH: Rebex.Net.SshException: Timeout exceeded while waiting for welcome message. Make sure you are connecting to an SSH or SFTP server. at Rebex.Net.SshSession.bOtYJuZ() at Rebex.Net.SshSession.Negotiate() Error Info: Rebex.Net.SshException: Timeout exceeded while waiting for welcome message. Make sure you are connecting to an SSH or SFTP server. at Rebex.Net.SshSession.bOtYJuZ() at Rebex.Net.SshSession.Negotiate() at Rebex.Net.Sftp.Connect(String serverName, Int32 serverPort, SshParameters parameters)'

Line information in MainForm.vb is 842 in the method of _sftp.BeginConnect

However by using the WinSCP, we are able to conduct a full test to the server and in responded by my network team, there were missing hanshake between the Server & Client. Kindly refer to the attached images for comparison between

Rebex Connection FTP Client Connection

Hope to hear for a favourable response, thank you.

Applies to: Rebex SFTP

2 Answers

0 votes
by (144k points)
edited
 
Best answer

From the attached images, it looks like Rebex SFTP did send the initial handshake message ("SSH-2.0-RebexSSH_2.0.3793.0\r"), but the server failed to send its initial message for some unknown reason. On the other hand, with WinSCP, the server was able to send its initial message ("SSH-2.0-SSHD\r" even sooner than it received the initial message from WinSCP. We are not really sure what is going on yet.

I sent you a link to the current build of Rebex SFTP with slightly changed handshake behavior, please give it a try. Does it make any difference? Please note that you can install this to a different folder if you don't wish to overwrite your current 2.0.3793.0 installation.

Edit: Build 4060 (and later) has a workaround for this that has to be explicitly enabled before connecting to the server:

C#:

Sftp client = new Sftp();
client.Options |= SftpOptions.WaitForServerWelcomeMessage;
...

VB.NET:

Dim client As New Sftp()
client.Options = client.Options Or SftpOptions.WaitForServerWelcomeMessage 
...
by (150 points)
edited

Thank you for the promptly response, the entire situation resolved after the patches and glad to have the full support from REBEX.

0 votes
by (140 points)
edited

Can I know if the SFTP connectivity issue was resolved just by installing the patch or a code change was also required to be done? I am facing same issue. Hence any inputs will really help.

by (58.9k points)
edited

Code change is needed, because the WaitForServerWelcomeMessage option is not applied automatically. You need to set the option to true like this:

Sftp sftp = new Sftp();
sftp.Settings.WaitForServerWelcomeMessage = true;

sftp.Connect("sftpserver");
sftp.Login("user", "pass");
// etc.

The free trial license of Rebex SFTP can be downloaded at http://www.rebex.net/sftp.net/download.aspx

...