Jump to content


Photo

Change protocol to SFTP over SSH


  • Please log in to reply
2 replies to this topic

#1 donj91711

donj91711
  • Members
  • 15 posts
  • Gender:
    Male

Posted 25 February 2011 - 10:38 PM

I am getting a connection error code 4.

Here is the log:
[20110225 22:01:45] SmartFTP FTP Library 2.0.86.0
[20110225 22:01:46] Resolving host name "<my ftp-server>"
[20110225 22:01:46] Connecting to <IP address> Port: 22
[20110225 22:01:46] Connected to <my ftp-server>.
[20110225 22:01:46] SSH-2.0-VShell_3_0_4_656 VShell
[20110225 22:01:46] SSH server detected. Change the protocol to SFTP over SSH and try again.
[20110225 22:02:16] Timeout (30s).
[20110225 22:02:16] 3

Here is my code:
objFTP.Port = 22
objFTP.Protocol = sfFTPLib.enumProtocol.ftpProtocolSSLExplicit
objFTP.Passive = True
objFTP.LogFile.File = "SmartFTP.log"
Connect = False
ret = objFTP.Connect

My question:
How do I change the protocol to "SFTP over SSH"?
I see these options in your documentation:
ftpProtocolNormal
ftpProtocolSSLImplicit
ftpProtocolSSLExplicit
ftpProtocolGridFTP

Are there more options that I'm not finding or is it one of these?

Thanks.

#2 mb

mb

    Developer

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

Posted 25 February 2011 - 10:57 PM

You need to use the SSHConnection class. Take a look at the SFTP samples (Samples/SFTP) that are provided with the FTP Library.

#3 donj91711

donj91711
  • Members
  • 15 posts
  • Gender:
    Male

Posted 25 February 2011 - 11:13 PM

That did it.

Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users