SSHClient
Posted: 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
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