Stéphane Wierzbicki 45 Posted September 14, 2019 (edited) Hello, Does Indy support SSH? I need to connect to an SFTP server. I don't need SFTP (FTP over SSH) as it is different than FTPS (FTP over SSL/TLS). If so, is there simple example available? If not, is there any free library available? Thank you! Edited September 14, 2019 by Stéphane Wierzbicki Share this post Link to post
WillH 33 Posted September 14, 2019 41 minutes ago, Stéphane Wierzbicki said: Does Indy support SSH? Indy does not support SSH. I use securebridge which is great for SSH and SFTP. Not free though. https://www.devart.com/sbridge/ 1 Share this post Link to post
Attila Kovacs 629 Posted September 14, 2019 Reading your question I don't really know what you need, but with https://www.clevercomponents.com/products/inetsuite/ I could cover all my needs in the past. There is also a discount right now. 1 Share this post Link to post
Stéphane Wierzbicki 45 Posted September 14, 2019 2 hours ago, Attila Kovacs said: Reading your question I don't really know what you need I need a component or a library that allows me to connect to a sFTP server. I will check links you and @WillH posted. Share this post Link to post
rvk 42 Posted September 15, 2019 You can do it with Synapse in combination with cryptlib, or better libssh2.dll, for free. There is some source out there (I think sftp_2000) for Delphi. If you can't find it I could convert the example I have from FPC/Lazarus back to Delphi (will need some time for that). Share this post Link to post
Remy Lebeau 1414 Posted September 17, 2019 On 9/14/2019 at 12:24 AM, Stéphane Wierzbicki said: Does Indy support SSH? No. On 9/14/2019 at 12:24 AM, Stéphane Wierzbicki said: I need to connect to an SFTP server. I don't need SFTP (FTP over SSH) as it is different than FTPS (FTP over SSL/TLS). Well, now I'm confused. You asked about SSH, then said you don't need SFTP (FTP over SSH). So which do you actually need - SFTP (which Indy does not support) or FTPS (which Indy does support)? Share this post Link to post
Stéphane Wierzbicki 45 Posted September 18, 2019 (edited) On 9/14/2019 at 9:24 AM, Stéphane Wierzbicki said: Hello, Does Indy support SSH? I need to connect to an SFTP server. I need SFTP (FTP over SSH) as it is different than FTPS (FTP over SSL/TLS). If so, is there simple example available? If not, is there any free library available? Thank you! Sorry for the confusion @Remy LebeauI need to connect to an SFTP server! Edited September 18, 2019 by Stéphane Wierzbicki Share this post Link to post
rvk 42 Posted September 19, 2019 On 9/14/2019 at 9:24 AM, Stéphane Wierzbicki said: If not, is there any free library available? Like I stated before, you can do it with Synapse (from Ararat) and libssh2.dll. There is a SimpleSFTP.pas in the demo-directory. But that one uses cryptlib.dll which isn't free distributable. But there are version which can also use libssh2.dll (which is free). I have one for FPC but not ported to Delphi. There are also versions which use plain winsock in combination with libssh2.dll (no need for Synapse). For example: https://github.com/pult/libssh2_delphi (and like others on github) Using the searchwords libssh2 and delphi in Google will get you a lot of results too. For the Synapse version you can just search for SimpleSFTP.pas and libssh2 and you can search for the latest working with libssh2.dll. If you have any problems let us know. 1 1 Share this post Link to post
Fr0sT.Brutal 900 Posted September 23, 2019 For Indy it should be relatively easy to write a IOHandler using SSH Share this post Link to post
Edwin Yip 154 Posted September 23, 2019 (edited) 7 hours ago, Fr0sT.Brutal said: For Indy it should be relatively easy to write a IOHandler using SSH Really? I know nothing about that, but Devart needed to create a whole set of classes for implementing ssh and sftp Edited September 23, 2019 by edwinyzh Share this post Link to post
Stéphane Wierzbicki 45 Posted September 23, 2019 10 hours ago, Fr0sT.Brutal said: For Indy it should be relatively easy to write a IOHandler using SSH No criticism @Remy Lebeau but why SSH was never implemented into Indy? Share this post Link to post
Fr0sT.Brutal 900 Posted September 24, 2019 14 hours ago, edwinyzh said: Really? I know nothing about that, but Devart needed to create a whole set of classes for implementing ssh and sftp I know little about that as well so it's better to ask Remy Share this post Link to post
Remy Lebeau 1414 Posted September 24, 2019 23 hours ago, Stéphane Wierzbicki said: No criticism @Remy Lebeau but why SSH was never implemented into Indy? Once upon a time, Indy had a larger dev team, but I suppose no-one ever had the time or opportunity to implement SSH. Not that it is a trivial protocol to implement, what with encryption and all. Now I'm the only dev left, and I definitely don't have the time to do something that large-scale on my own. I don't even have a working SChannel IOHandler working yet, and that is just using a few (albeit complicated) system APIs. I suppose someone could write an IOHandler wrapper for libssh or similar library, though. 1 1 Share this post Link to post
Remy Lebeau 1414 Posted October 1, 2019 1 hour ago, Fr0sT.Brutal said: Found SChannel IOHandler here Thanks, I'm already aware of that implementation. I had discussions with the author about it, I just haven't had a chance to incorporate it directly into Indy yet: #49 Create an SSL IOHandler for Win32 that uses Microsoft CryptoAPI instead of OpenSSL 1 Share this post Link to post
Edwin Yip 154 Posted October 2, 2019 10 hours ago, Fr0sT.Brutal said: Found SChannel IOHandler here I heard about it before, but I didn't know it has any relationship with SFTP or SSH... Share this post Link to post
Fr0sT.Brutal 900 Posted October 2, 2019 7 hours ago, edwinyzh said: I heard about it before, but I didn't know it has any relationship with SFTP or SSH... It doesn't but it shows that implementing your own IOHandler is not a rocket science... Share this post Link to post
Vandrovnik 214 Posted October 31, 2019 Today I found and just briefly tested this: https://github.com/superflexible/TGPuttyLib 4 Share this post Link to post
Edwin Yip 154 Posted November 1, 2019 18 hours ago, Vandrovnik said: Today I found and just briefly tested this: https://github.com/superflexible/TGPuttyLib And what's the result, did it work :) Share this post Link to post
Vandrovnik 214 Posted November 1, 2019 (edited) Yes, it works (I was able to connect, upload and download files). Probably I would have to set file rights after upload (it was uploaded to linux server, file rights were set to 000). Paradox is, that customer prefers something with support, so I had to buy Devarts SecureBridge Standard... Edited November 1, 2019 by Vandrovnik 1 Share this post Link to post
tobiasgiesen 3 Posted December 19, 2019 Hello, I would like to let you know that the uploading permissions bug has been fixed in the latest TGPuttyLib version. 1 2 Share this post Link to post
Al T 12 Posted October 18, 2022 SFTP and SSH commands are natively supported by Windows 10 version 1803 and Windows 11 now. You can use my Windows Command Prompt Pipeline to interface with the two commands without "bringing up" command.com terminal Window. You'll have to build your own commands as I haven't created a interface with it yet. Share this post Link to post