Change protocol to SFTP over SSH

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
donj91711
Posts: 34
Joined: Fri Jul 30, 2010 7:01 pm

Change protocol to SFTP over SSH

Post by donj91711 » Fri Feb 25, 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.

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: Change protocol to SFTP over SSH

Post by mb » Fri Feb 25, 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.
Last edited by mb on Fri Feb 25, 2011 10:58 pm, edited 1 time in total.

donj91711
Posts: 34
Joined: Fri Jul 30, 2010 7:01 pm

Re: Change protocol to SFTP over SSH

Post by donj91711 » Fri Feb 25, 2011 11:13 pm

That did it.

Thanks

Post Reply