Recent

Author Topic: SFTP Connection  (Read 692 times)

jorge_mosquera

  • Newbie
  • Posts: 6
SFTP Connection
« on: February 12, 2025, 04:34:02 pm »
Hello   ;D. Please can you tell me which components should be used and if possible an example to create a connection client to an SFTP server to send and download files. I work on Windows with Lazarus 3.6 and FPC 3.2.2.

Thank you  8-)

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1477
    • Lebeau Software
Re: SFTP Connection
« Reply #1 on: February 12, 2025, 04:53:00 pm »
Just to be clear - do you really want SFTP (FTP over SSH) or do you want FTPS (FTP over SSL/TLS)? Many people get this backwards, and they are not interchangeable.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

jorge_mosquera

  • Newbie
  • Posts: 6
Re: SFTP Connection
« Reply #2 on: February 13, 2025, 04:16:24 pm »
Hi, i need to connect to SFTP (FTP over SSH) server.

rvk

  • Hero Member
  • *****
  • Posts: 6683
Re: SFTP Connection
« Reply #3 on: February 13, 2025, 04:29:45 pm »
It has been a while but there are several topics about it (in which I participated).

https://forum.lazarus.freepascal.org/index.php/topic,59886.msg447450.html#msg447450

jorge_mosquera

  • Newbie
  • Posts: 6
Re: SFTP Connection
« Reply #4 on: February 14, 2025, 02:26:46 pm »
Hi, download the code but now the following error appears:

Code execution cannot continue because the libcl.so library was not found. This problem can be solved by reinstalling the program

I attach the project

Regards

rvk

  • Hero Member
  • *****
  • Posts: 6683
Re: SFTP Connection
« Reply #5 on: February 14, 2025, 02:34:53 pm »
Code execution cannot continue because the libcl.so library was not found. This problem can be solved by reinstalling the program
I thought you said you were on Windows. So I'm not sure why it would want to load libcl.so...  %)

Second... you have ssl_cryptlib in there. So you would need the CryptLib library dll's (CL32.DLL on Windows and libcl.so on Linux).
Those are not free for commercial use. I'm also not sure where you could download those (because I never used those because of that limitation).

You can also use libssh2 instead of CryptLib (and libssh2 is freely distributable).
I know you can get the libssh2.dll from the curl installation like I linked to in one of those topics.

 

TinyPortal © 2005-2018