Hi, currently i'm using trial version of secure bridge. I tried these codes below to connect to sftp server.
And I got this error Project1.exe raised exception class EScError with message 'Host key not verified'
But when I tried using winscp or filezilla, I'm able to connect.
Not sure what is wrong with my source code below
ScSSHClient.HostName := 'hello.com';
ScSSHClient.Port := 22;
ScSSHClient.User := 'blablabla';
ScSSHClient.Authentication := atPassword;
ScSSHClient.Password := 'blablabla';
ScSSHClient.Connect;
Host key not verified error
Re: Host key not verified error
The "Host key not verified" error occurs if the key received from the server and the key specified in HostKeyName do not match. You should handle the TScSSHClient.OnServerKeyValidate event. You can find the more detailed information about this event in SecureBridge help. Also you can look at the sample of this event handling in the SFTPClient demo project. The SFTPClient demo project is located at %SecureBridgeDemos%\SFTPClient. %SecureBridgeDemos% is the path where SecureBridge demo projects are installed on your computer.
Re: Host key not verified error
Thanks, I can connect now using sftpclient demo.
I've problem viewing/browse the root folder. It shows nothing/blank in the treeview. Can help me ?
I've problem viewing/browse the root folder. It shows nothing/blank in the treeview. Can help me ?
Re: Host key not verified error
To get the files in the root directory, you should execute the SFTPClient.OpenDirectory method with the ".." parameter. For example:
If this does not help to solve your task, please make sure that in our SFTPClient demo sample the ScSSHClient.NonBlocking property is set to False. Also, specify the directory that is read when you connect using Filezilla.
In our SFTPClient demo sample, just set the value .. in the path input field and click the Start SFTP button.SFTPClient.OpenDirectory ('..');
If this does not help to solve your task, please make sure that in our SFTPClient demo sample the ScSSHClient.NonBlocking property is set to False. Also, specify the directory that is read when you connect using Filezilla.