login about faq

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

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

    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

I can however connect to any other configured port.

asked Oct 09 '12 at 05:54

Tinus's gravatar image


edited Oct 09 '12 at 13:54

chilkat's gravatar image

chilkat ♦♦

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.


answered Oct 10 '12 at 16:40

chilkat's gravatar image

chilkat ♦♦

This new build will not return with a failed status if port 21 is used. It will instead only issue a warning in the LastErrorText. Of course, if it really is an FTP server (not an SSH server) then the Connect method will fail.


(Oct 12 '12 at 08:52) chilkat ♦♦

“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”.


answered Oct 09 '12 at 13:54

chilkat's gravatar image

chilkat ♦♦

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.


answered Oct 10 '12 at 15:04

Tinus's gravatar image


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

When will de update be available?



answered Oct 11 '12 at 06:49

Tinus's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Oct 09 '12 at 05:54

Seen: 9,805 times

Last updated: Oct 12 '12 at 08:52

powered by OSQA