SFTP support in FreePascal applications lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- vicot · 2016-01-22 21:33 Hi, I have noticed that there does not seem to be support for SFTP either in Synapse or in lNet, nor in any other free library. From what I could find, the only FreePascal library that supports SFTP is Devart SecureBridge Components, but it's a commercial product. Isn't there really any free SFTP library in the FreePascal ecosystem? Thanks --vicot ---------------------------------------------------------------------- zeljko · 2016-01-22 21:41 Yes, I'm using libssh2 from synapse for that purpose ---------------------------------------------------------------------- vicot · 2016-01-22 21:43 Does it work well? Is it easy to set up and use? Any good tutorials / examples? ---------------------------------------------------------------------- Graeme · 2016-01-23 00:21 Quote from: vicot on January 22, 2016, 10:33:29 pmI have noticed that there does not seem to be support for SFTP either in Synapse or in lNet, nor in any other free library. I'm affraid you have been misinformed. Indy 10 support secure client and server FTP components.    http://www.indyproject.org/kb/index.html?howdoiuseftpwithssl.htm Use the Indy 10 SVN URL for the latest code that works 100% with FPC 2.6.4 and FPC 3.0.     https://svn.atozed.com:444/svn/Indy10/trunk ---------------------------------------------------------------------- vicot · 2016-01-23 07:03 Quote from: Graeme on January 23, 2016, 01:21:14 amQuote from: vicot on January 22, 2016, 10:33:29 pmI have noticed that there does not seem to be support for SFTP either in Synapse or in lNet, nor in any other free library. I'm affraid you have been misinformed. Indy 10 support secure client and server FTP components.    http://www.indyproject.org/kb/index.html?howdoiuseftpwithssl.htm Use the Indy 10 SVN URL for the latest code that works 100% with FPC 2.6.4 and FPC 3.0.     https://svn.atozed.com:444/svn/Indy10/trunk SFTP is different from FTP+SSL (which is called FTPS) ---------------------------------------------------------------------- Thaddy · 2016-01-23 07:27 https://nl.wikipedia.org/wiki/SSH_File_Transfer_Protocol SFTP with synapse: http://synapse.ararat.cz/files/contrib/sftp.zip ---------------------------------------------------------------------- zeljko · 2016-01-23 09:23 Quote from: vicot on January 22, 2016, 10:43:00 pmDoes it work well? Is it easy to set up and use? Any good tutorials / examples? Yes, it's pretty easy to use (you have C examples on net for sftp, they're easy to understand and translate to pascal). Thaddy provided link for sources for you ---------------------------------------------------------------------- Graeme · 2016-01-23 12:45 Quote from: vicot on January 23, 2016, 08:03:51 amSFTP is different from FTP+SSL (which is called FTPS) I believe Indy supports both. ---------------------------------------------------------------------- edwinyzh · 2019-04-17 06:22 Quote from: Graeme on January 23, 2016, 01:45:20 pmQuote from: vicot on January 23, 2016, 08:03:51 amSFTP is different from FTP+SSL (which is called FTPS) I believe Indy supports both. This is incorrect, Indy supports FTPS, not SFTP, see https://github.com/IndySockets/Indy/issues/253 ---------------------------------------------------------------------- Thaddy · 2019-04-17 06:56 Quote from: Graeme on January 23, 2016, 01:45:20 pmQuote from: vicot on January 23, 2016, 08:03:51 amSFTP is different from FTP+SSL (which is called FTPS) I believe Indy supports both. It's FTP over SSH, not ssl... FPC supports both. Here's a link using synapse http://synapse.ararat.cz/files/contrib/sftp.zip ---------------------------------------------------------------------- rvk · 2019-04-17 07:15 Quote from: Thaddy on April 17, 2019, 08:56:49 amHere's a link using synapse http://synapse.ararat.cz/files/contrib/sftp.zip That one requires cl32.dll (CryptLib) which you might not be able to distribute with your program depending on the license. But the same source can be made to work with libssh2 (which I think has a more liberate license policy). https://forum.lazarus.freepascal.org/index.php/topic,28053.msg178389.h tml#msg178389 ---------------------------------------------------------------------- Remy Lebeau · 2019-04-17 20:11 Quote from: Thaddy on April 17, 2019, 08:56:49 amQuote from: vicot on January 23, 2016, 08:03:51 amSFTP is different from FTP+SSL (which is called FTPS) It's FTP over SSH, not ssl... vicot was referring to FTPS, which is indeed FTP over SSL/TLS, and is what Indy supports.  SFTP is FTP over SSH, which Indy does not support at this time.