Archived Forum Post

Index of archived forum posts

Question:

SFTP over port 21

Oct 12 '12 at 08:52

I have a SFTP server configured to listen on port 21.

When I connect to this server I get the following error message:

ChilkatLog:
  Connect_SFtp:
    DllDate: Apr 17 2012
    UnlockPrefix: *
    Username: *
    Architecture: Little Endian; 64-bit
    Language: .NET 4.0 / x64
    SftpVersion: 0
    SFTP is a subsystem of SSH. Must connect to an SSH server.
    Connecting to an FTP server is incorrect.
    The FTP protocol is unrelated to SSH.
    See http://www.cknotes.com/?p=411
  --Connect_SFtp
--ChilkatLog

I can however connect to any other configured port.


Accepted Answer

I see the problem. It is because Chilkat receives such a large volume of support email from programmers that don't know the difference between FTP/FTPS and SSH/SFTP. To help a programmer quickly understand the issue, the SFtp.Connect method checks for port 21, and if found, then provides information about it in the LastErrorText (and then fails the method call without even trying to connect). Apparently it should still try to connect even though the port is 21. I'll upload a new .NET 4.0 x64 build with the modification.


Answer

“SFTP” is the Secure File Transfer Protocol over SSH. It is a protocol unrelated to the FTP protocol. (It is actually a subsystem of SSH.) The Chilkat SSH / SFTP component is used for “SFTP”. SFTP is achieved by connecting to an SSH server at port 22.

On the other hand, the Chilkat FTP2 component is for FTP. FTP servers listen at port 21 (non-SSL/TLS) and port 990 (SSL). FTP over SSL (i.e. port 990) is called “FTPS”.


Answer

Sorry Chilkat, but I would like to down vote your answer, it does not answer my question but merely states commonly know facts.

SFTP is achieved by connecting to an SSH server at any port. My SFTP server is at port 21. Filezilla does not have any problem connecting to it.

The reason for having this server at port 21 is firewall related.


Answer

Sorry for being so grumpy about your answer earlier. ;)

When will de update be available?

Thanks!