Create SSH Keypair with Securebridge?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Create SSH Keypair with Securebridge?

Post by kaffeburk » Sun 15 Sep 2019 12:05

Hello,

Is there some easy way to create a SSH key pair with SecureBridge? Preferably with some code example. Its the same functionality as in Putty for this i'm looking for.

Best Regards, Pär

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Create SSH Keypair with Securebridge?

Post by ViktorV » Fri 20 Sep 2019 11:35

To solve the defined task, you can use the TScKey.Generate method for RSA and DSA keys, and the TScKey.GenerateEC method to generate Elliptic Curve keys: https://devart.com/sbridge/docs/index.h ... nerate.htm
Here's a code example for generating and exporting RSA keys:

Code: Select all

procedure TMyForm.Button1Click(Sender: TObject);
var
  Key: TScKey;
begin
  Key := TScKey.Create(ScFileStorage.Keys);
  Key.KeyName := 'MyKey';

  Key.Generate(aaRSA, 2048);
  Key.ExportTo(Key.KeyName + '.pub', True, '');
end;

kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Re: Create SSH Keypair with Securebridge?

Post by kaffeburk » Tue 24 Sep 2019 09:30

Thanx, exactly what i was looking for,

/Pär

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Create SSH Keypair with Securebridge?

Post by ViktorV » Wed 25 Sep 2019 12:04

Thank you for the interest to our product.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply