pdiaz 0 Posted May 27, 2020 Hello I´m developing with delphi 10.2.3 and I need to connect to sftp site with a privateKey The source code it´s very simple. I have only assigned this parameters FtpClient1.HostName := 'sftp.....'; FtpClient1.Port := 'port'; FtpClient1.UserName := 'user'; SslContext1.SslPrivKeyFile := 'PrivateKeyProd.ppk'; if FtpClient1.Connect then Display('Command Success'); else Display('Command Failure'); I have also dll requerid libcrypto-1_1.dll libssl-1_1.dll But I only received this mistake (see attached image) It is possible to connect via SFTP?? Thanks Share this post Link to post
Angus Robertson 577 Posted May 27, 2020 Depends what you think SFTP means, there is no standardised protocol with that name. If you mean FTP over SSH with a private key, ICS does not support that. If you mean FTP using SSL/TLS, then ICS does support it, But the source code is not as simple as you think, clients don't need a private key or SSL certificate, only servers, unless you are trying to implement client certificates which is very rare. ICS also does not recognise files with extension PPK, nor whatever content you have in it which is what the OpenSSL error effectively says. But you don't need it. There are several ICS FTP example applications, I suggest you build Samples\delphi\sslinternet\OverbyteIcsXferTst.dpr first. Angus Share this post Link to post
stijnsanders 37 Posted May 28, 2020 I've been using WinSCP to perform SFTP where I needed it. The software runs on servers under my control, so it's no problem to have WinSCP installed there. If you call CreateProcess on WinSCP.com with the /nointeractiveinput and the correct command line parameters, you can have a series of command complete and give predictable output you can process. Share this post Link to post