Monday, August 13, 2007

Sftp Vs. Ftps

Totally different things.

SFTP and FTPS (FTP over SSL) are indeed very different and are often confused. The SFTP protocol is actually a subsystem of the SSH protocol whereas the FTPS protocol runs on top of the FTP protocol using an SSL encrypted channel. Unlike the FTPS protocol the SSH/SFTP protocol is a packet based protocol whereas the FTPS protocol is command based. For this reason you will find that FTPS is generally faster than SFTP/SSH. There are also two different types of FTPS, explicit-SSL and implicit-SSL to add to the confusion.

Explicit-SSL - Connection starts on standard FTP port (usually 21) in non-encrypted state. Client then sends AUTH SSL or AUTH TLS command to server requesting that it switches to encrypted channel before sending user credentials. The advantage of explicit-SSL is that the server can handle both encrypted and non-encrypted sessions on the same port (21).

Implicit-SSL - Unlike explicit-SSL, this connection starts off encrypted and there is no going to an unencrypted session. This usually runs on port 990. Advantage is that you can force users to connect using encrypted session, though some servers also allow you to do this at account level in Explicit-SSL.

Some API for SFTP and FTPS are:

FTP/FTPS
http://www.jscape.com/articles/ftp_using_csharp.html

SFTP/SSH
http://www.jscape.com/articles/sftp_using_csharp.html

1st one

First Blog
Cong~~~ !