Host key not verified

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
angy_abacom
Posts: 1
Joined: Tue 27 Aug 2019 15:57

Host key not verified

Post by angy_abacom » Tue 27 Aug 2019 16:06

Hello
I want to use the SFTPClient component to upload a file to an SFTP server.

I used the following code:

Code: Select all

SSHOpera.HostName: = fFTP_AD;
SSHOpera.User: = fFTP_LOGIN;
SSHOpera.Password: = fFTP_MDP;
SSHOpera.Port: = fFTP_PORT;
SSHOpera.Connect;

SFTPOpera.Initialize;
if Typetransfert = 'VENTE' then
            begin
              SFTPOpera.UploadFile(IncludeTrailingBackslash(Chemin_Recherche) + sr.Name, IncludeTrailingBackslash(fFTP_Vente) + sr.Name, False);
            end
            else
            begin
              SFTPOpera.UploadFile(IncludeTrailingBackslash(Chemin_Recherche) + sr.Name, IncludeTrailingBackslash(fFTP_Achat) + sr.Name, False);
            end;

             SFTPOpera.Disconnect;
             SSHOpera.Disconnect;

Code: Select all

procedure TFrmExport_Opera.SSHOperaServerKeyValidate(Sender: TObject;
  NewServerKey: TScKey; var Accept: Boolean);
begin
  Accept := True;
end;
I get the following error:
Host key not verified

Can you help me solve the problem?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Host key not verified

Post by ViktorV » Wed 28 Aug 2019 11:43

Please clarify the issue you encountered using our SFTPClient demo project. You can find the SFTPClient project in the %SecureBridgeDemos%\SFTPClient directory. %SecureBridgeDemos% is the SecureBridge Demo projects installation path on your computer.
If the issue is not reproduced on our SFTPClient demo project, please bring you code into accordance with the code used in our SFTPClient project. Otherwise, please compose a full sample demonstrating the specified behavior and send it to us using the contact form https://www.devart.com/company/contactform.html, in order for us to provide you a more detailed answer.

Post Reply