SSHClient

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
ShaunC33
Posts: 4
Joined: Tue 14 Oct 2014 10:06

SSHClient

Post by ShaunC33 » Tue 14 Oct 2014 10:44

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

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: SSHClient

Post by Dimon » Tue 14 Oct 2014 12:56

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.

ShaunC33
Posts: 4
Joined: Tue 14 Oct 2014 10:06

Re: SSHClient

Post by ShaunC33 » Tue 14 Oct 2014 15:29

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

ShaunC33
Posts: 4
Joined: Tue 14 Oct 2014 10:06

Re: SSHClient

Post by ShaunC33 » Wed 15 Oct 2014 09:31

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.

ShaunC33
Posts: 4
Joined: Tue 14 Oct 2014 10:06

Re: SSHClient

Post by ShaunC33 » Thu 16 Oct 2014 15:33

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

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: SSHClient

Post by Dimon » Fri 24 Oct 2014 11:36

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.

Post Reply