Page 1 of 1

SSHClient

Posted: Tue 14 Oct 2014 10:44
by ShaunC33
Hello,

We have just purchased SecureBridge Professional 6.4.6.

Using Delphi XE7, we are trying to access a demo SFTP server.

I have a user name and no password, the sever however do's uses a .ppk to authenticate the connection.

Using FileZilla and WinSCP I am able to connect.

When trying to use :

begin
var
Key: TScKey;
ScSSHClient: TScSSHClient;
begin
ScSSHClient := TScSSHClient.Create(nil);

ScSSHClient.KeyStorage := ScFileStorage1;
ScSSHClient.HostName:='demoServer';// Not actual, but don't like posting online
ScSSHClient.HostKeyName := 'server';
ScSSHClient.OnServerKeyValidate := ScSSHClient1ServerKeyValidate;
ScSSHClient.User := 'shaun';
ScSSHClient.Password := '';
ScSSHClient.Connect;
end;

procedure TForm1.ScSSHClient1ServerKeyValidate(Sender: TObject;
NewServerKey: TScKey; var Accept: Boolean);
begin
Accept := True;
end;

ScFileStorage1 - Under Keys has 'server' which I imported from puttygen.exe conversion for the ppk.

When I run the application I get a 'Host key not verified.' error.

What have I missed?

Regards Shaun

Re: SSHClient

Posted: Tue 14 Oct 2014 12:56
by Dimon
This error occurs if the key received from the server and the key specified in HostKeyName do not match.
Please check if the problem is reproduced when the TScSSHClient.HostKeyName property is clear.

Re: SSHClient

Posted: Tue 14 Oct 2014 15:29
by ShaunC33
Hello Dimon

Yes, when HostKeyName := '' comes up with the same 'Host key not verified'.

Should I export the .ppk to OpenSSh or ssh.com key to be used with this suit?

Regards
Shaun

Re: SSHClient

Posted: Wed 15 Oct 2014 09:31
by ShaunC33
Converted the ppk to a Pub file.

Using that I am able to connect to SFTP in FileZilla.

However even using the Demo Application 'SFTPClient', I am still not able to access this via the secure Bridge components..
'SFTPClient' comes back with a 'Host key no verified' error.

Re: SSHClient

Posted: Thu 16 Oct 2014 15:33
by ShaunC33
Hello,

Any chance of a solution on this?

We have had to go back to the ChilKat 30 day trial to finish this demo application.

Regards
Shaun

Re: SSHClient

Posted: Fri 24 Oct 2014 11:36
by Dimon
To investigate the problem, perform the next steps:
1. Set the TScSSHClient.HostKeyName property to a nonexistent key name, like 'qwertyuiop'.
2. Handle the TScSSHClient.OnServerKeyValidate event and set the Accept parameter to True.
Check if the 'Host key not verified' exception still arises.