Hi
Using delphi XE7, secure bridge 8.01 pro and Mydac 9.01 pro
How can I do to connect to a VPS using a ppk file instead of user and password?
VPS with ppk file
Re: VPS with ppk file
To solve the issue, you should set the TScSSHClient.Authentication property to atPublicKey and the TScSSHClient.PrivateKeyName property to valid key name after importing the ppk file. Example:
Code: Select all
procedure Connect;
var
Key: TScKey;
begin
Key := TScKey.Create(ScFileStorage.Keys);
Key.KeyName := 'key1';
Key.ImportFrom(Filename);
ScSSHClient.Authentication := atPublicKey;
ScSSHClient.KeyStorage := ScFileStorage;
ScSSHClient.PrivateKeyName := 'key1';
ScSSHClient.Connect;
end;