We have an automated ftp transfer using Rebex SFTP. But we cannot connect to the SFTP server unless there is a connection already made at the same time by another client (FileZilla). Log information is shown below. We are using the default SSH parameters when connecting. That is, we connect like this:
Sftp conn = new Sftp();
conn.Connect("ftp.example.com", 22);
// verify fingerprint...
conn.Login("joeuser", "joeuser's password");
Any ideas?
Logs are as follows:
If FileZilla is connected when we try to connect, we get this in the log:
2012-05-16 09:25:35.610 INFO Sftp(33) Info: Connecting to ftp.example.com:22 using Sftp 2.0.4086.0.
2012-05-16 09:25:35.688 INFO Sftp(33) SSH: Negotiation started.
2012-05-16 09:25:36.078 INFO Sftp(33) SSH: Negotiation finished.
2012-05-16 09:25:36.078 INFO Sftp(33) Info: Server: SSH-2.0-9.99 sshlib: 7.0.0.0
2012-05-16 09:25:36.078 INFO Sftp(33) Info: Fingerprint: dc:08:44:26:ab:3c:a9:5e:45:24:ba:d8:7f:a4:be:6e
2012-05-16 09:25:36.078 INFO Sftp(33) Info: Cipher info: SSH 2.0, DiffieHellmanGroupExchangeSHA1, DSS, aes256-ctr/aes256-ctr, SHA1/SHA1
2012-05-16 09:25:36.702 INFO Sftp(33) Command: SSH_FXP_INIT (4)
2012-05-16 09:25:36.749 INFO Sftp(33) Response: SSH_FXP_VERSION (3, 0 extensions)
2012-05-16 09:25:36.749 INFO Sftp(33) Info: Using SFTP v3.
...
If there isn't another connection already established at the time, we timeout waiting for the welcome message, and this is what we get in the log:
2012-05-16 09:21:57.973 INFO Sftp(31) Info: Connecting to ftp.example.com:22 using Sftp 2.0.4086.0.
2012-05-16 09:22:59.235 ERROR Sftp(31) 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())
2012-05-16 09:22:59.235 ERROR Sftp(31) 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))