Jump to content


Photo

Problems connecting to many SFTP Server after upgrading from v1.5 to 2.0


  • Please log in to reply
3 replies to this topic

#1 guruper

guruper
  • Members
  • 3 posts

Posted 15 October 2010 - 11:20 AM

Hi,

We have been using the Smart library for the last 2 years to automatically download files from several SFTP servers. During a new installation of a server, we got an error message that our licence had exired. So we bought the upgrade to 2.0. Recompiling our wrapper assembly was done with some rewriting of the code as the 2.0 version has slightly different methods of connecting. The problem is that we cannot connect to many of our SFTP Servers with the new version of Smart FTP library. To be able to isolate the problem, I've used the sample code for C# - SFTP. It works on one SFTP Server, and fails on another. Connecting to the same servers in the Smart FTP Client Program works fine. So the problem is with the Smart FTP Library.

Take a look at the 2 logs from the Smart FTP Client. Can you see any important differences that explains why this new component is not working anymore?

Our production system, which downloads thousands of files every week, is now down due to this problem, so I'm hoping for a fast solution.

This one is working
-------------------------
Resolving host name "yyy.yyyyyyy.com"
Connecting to yyy.yyy.yyy.yyy Port: 22
SSH-2.0-4.0.5.5 SSH Secure Shell
Starting SSH session. Remote Id: "SSH-2.0-4.0.5.5 SSH Secure Shell"
SSH protocol version reply. Client Id: "SSH-2.0-SmartFTP"
Key Exchange Algorithm: diffie-hellman-group1-sha1
Key exchange completed.
Host Key Algorithm: ssh-dss
Client to Server Encryption: aes128-cbc
Server to Client Encryption: aes128-cbc
Session MAC: hmac-sha1
Client to Server Compression: zlib
Server to Client Compression: zlib
Requesting service "ssh-userauth".
RTT: 24.435 ms
Authentication request. Method: "none"
Server supported authentications: publickey,password
Authentication request. Method: "password"
User authentication successful.
SSH session established.
Connected to 195.43.63.61.

Opening channel 0.
Channel successfully opened (Local=0, Remote=0).
SFTP protocol version 3

-------------------------
This one is NOT working
-------------------------
Resolving host name "xxx.xxxxxxx.com"
Connecting to xxx.xxx.xxx.xxx Port: 22
SSH-2.0-1.82 sshlib: WinSSHD 4.23
Starting SSH session. Remote Id: "SSH-2.0-1.82 sshlib: WinSSHD 4.23"
SSH protocol version reply. Client Id: "SSH-2.0-SmartFTP"
Key Exchange Algorithm: diffie-hellman-group-exchange-sha1
Key exchange completed.
Host Key Algorithm: ssh-dss
Client to Server Encryption: aes128-cbc
Server to Client Encryption: aes128-cbc
Session MAC: hmac-sha1
Client to Server Compression: zlib
Server to Client Compression: zlib
Requesting service "ssh-userauth".
RTT: 114.960 ms
Authentication request. Method: "none"
Server supported authentications: publickey,gssapi-with-mic,password
Authentication request. Method: "password"
User authentication successful.
SSH session established.
Connected to hurtigvask.posten.no.
Detected Server Software: Bitvise WinSSHD
Opening channel 0.
Channel successfully opened (Local=0, Remote=0).
SFTP protocol version 3

#2 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 15 October 2010 - 12:32 PM

SmartFTP uses the FTP Library. So the problem is most likely somewhere in the code. In version 2.0 of the FTP library you need to first open a SSH connection and then you create an SFTPConnection.

In both logs you have posted a SSH connection as well as an SFTP connection has been opened.

#3 guruper

guruper
  • Members
  • 3 posts

Posted 15 October 2010 - 12:58 PM

SmartFTP uses the FTP Library. So the problem is most likely somewhere in the code. In version 2.0 of the FTP library you need to first open a SSH connection and then you create an SFTPConnection.

In both logs you have posted a SSH connection as well as an SFTP connection have been opened.




I know, and I have altered the code. I have also used the sample code from the C# folder and it looks like this:

SSHConn.Host = "xxxxxxxx";
SSHConn.Port = 22;
SSHConn.Username = "xxxx";
SSHConn.Password = "xxxx";
SSHConn.LogFile.File = "CSharp.log";

sfFTPLib.enumError err = SSHConn.Connect();


The program hangs when calling the .Connect method. The Timout property has no effect.

#4 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 15 October 2010 - 02:31 PM

Can you send us the server username/pw and host information to reproduce the problem?

Regards,
Mat




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users