distributing SSH keys

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
PaulReeves
Posts: 4
Joined: Fri 05 Aug 2011 13:32
Location: United States

distributing SSH keys

Post by PaulReeves » Thu 06 Oct 2011 16:47

I've recently added SSH connections to a PostgresQL database (using SecureBridge and PGDAC components). This is perhaps a basic question best asked elsewhere, but is there a simple way to compile the required SSH keys into the program data? I like being able to distribute a single EXE file. If possible, would this be bad practice?

Memnarch
Posts: 5
Joined: Tue 04 Oct 2011 08:12

Post by Memnarch » Fri 07 Oct 2011 11:36

similar problem here.
I tried to load a key from a string in delphi and it failed.

write string to stream
key import from stream
-->wrong data format

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

Re: distributing SSH keys

Post by Dimon » Tue 11 Oct 2011 09:21

PaulReeves wrote:I've recently added SSH connections to a PostgresQL database (using SecureBridge and PGDAC components). This is perhaps a basic question best asked elsewhere, but is there a simple way to compile the required SSH keys into the program data? I like being able to distribute a single EXE file. If possible, would this be bad practice?
You can store your SSH keys into the program data, but it is very insecure way and it contradicts with the principles of secure connections.
For every connection maximum 2 keys are needed - a server public key and a client private key. Server public key can be changed by server any time and therefore it is not effective to store it in the program data. Client private key must be individual for every client and must be protected from external access for the sake of security. Therefore this key cannot be stored in the program data as well.

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

Post by Dimon » Tue 11 Oct 2011 09:22

Memnarch wrote:similar problem here.
I tried to load a key from a string in delphi and it failed.

write string to stream
key import from stream
-->wrong data format
SecureBridge allows importing keys from many formats. But all the same this file or stream must contain all data, including captions and description that define the appropriate format. You can generate a new key using the TScKey.Generate method and try saving it in different formats using the TScKey.ExportTo method that will help you to see the data that is saved.

BlackWitcher
Posts: 1
Joined: Tue 15 Nov 2011 07:16

Re: distributing SSH keys

Post by BlackWitcher » Tue 15 Nov 2011 09:31

Hello!

I have similar situation but it's have some differences (sorry for big message):

I want to put SSH key files in local protected database (distributed with application) in BLOB-fields, and take this keys from DB before create connection to server.

I solved this task with ScFileStorage component as a Storage assigned with ScSSHClient component.

All is ok, but ScFileStorage create key-files on hard disk even if I put keys from TStream (First I created two ScKey object [user key and server key] and import keys from stream over ScKey.ImportFrom method, then add ScKey into empty ScFileStorage).

Of course I can make ScFileStorage.DeleteStorage after disconnect, but I want to avoid *.key files on disk when my App is works.

I thought about using ScRegStorage, but:
1. I won't touch registry at whole.
2. I'm afraid collisions, when final user will haven't permissions to work with registry.

So, is there some methods to use key storage in memory only?

May be in next versions you can add new component, named likes ScMemStorage (could works with TMemoryStream)?

In any case, thank you in advance and many thanks for beautiful and effective component suite.

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

Post by Dimon » Wed 16 Nov 2011 07:19

Thank you for the advice. We will investigate the possibility of adding such functionality in one of the next SecureBridge builds.

amiller29au
Posts: 11
Joined: Fri 03 Dec 2010 00:45
Location: AU

Re: distributing SSH keys

Post by amiller29au » Wed 29 Aug 2012 07:39

Adding Vote to have this functionality added.

AndreyZ

Re: distributing SSH keys

Post by AndreyZ » Fri 31 Aug 2012 08:11

You can leave your suggestions for a new SecureBridge functionality at our UserVoice page: http://devart.uservoice.com/forums/174370-securebridge

Post Reply