I\'m writing a simple Delphi App to upload a few files to a SFTP Server. i thought i would be able to use a TIdFTP indy client but it seams as tho their is not an option for
1) SFTP is NOT FTP-over-SSH. Read the discussion here.
2) For SFTP there are no free Delphi components. You can use our SFTP client and server components for Delphi (part of SecureBlackbox product), which are supported and maintained commercial solution.
libssh2 (wriiten in C) supports SFTP, and we have two separate Delphi wrappers (not sure which one is better):
https://github.com/pult/libssh2_delphi and https://github.com/dimmaq/delphi-libssh2
SecureBridge from DevArt also support SFTP, comes with full source for the Professional Editon.
And since October 2019, there's a DLL fork of PuTTY with Delphi units, please see https://github.com/superflexible/TGPuttyLib
This was created to be able to achieve the highest possible transfer rates over SFTP. It's free and very easy to use (with examples).
SFTP and "FTP over SSH" are two separate things, and neither involves SSL (as someone else has suggested). SFTP is a sub-protocol of SSH while "FTP over SSH" is good/bad ol' FTP tunnelled through an SSH connection with port forwarding.
Either way, what you're after is a Delphi SSH library. I was unable to find a free SSH library for Delphi and ended purchasing SecureBlackbox (http://www.eldos.com/), which is excellent by the way, although SecureBridge (http://www.devart.com) also looks pretty good.
I've been using PuTTY's SCP command line utility, with catching it's standard out via the CreateProcess method.
IP*Works include SFTP component - http://www.nsoftware.com/products/component/sftp.aspx and registered user of Delphi XE a XE2 can download this from code central (ID: 28437, ID: 28012)
and for Synapse is in contrib dir demo of simple SFTP - http://synapse.ararat.cz/files/contrib/