distributing SSH keys
-
- Posts: 4
- Joined: Fri 05 Aug 2011 13:32
- Location: United States
distributing SSH keys
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?
Re: distributing SSH keys
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.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?
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.
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.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
-
- Posts: 1
- Joined: Tue 15 Nov 2011 07:16
Re: distributing SSH keys
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.
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.
-
- Posts: 11
- Joined: Fri 03 Dec 2010 00:45
- Location: AU
Re: distributing SSH keys
Adding Vote to have this functionality added.
Re: distributing SSH keys
You can leave your suggestions for a new SecureBridge functionality at our UserVoice page: http://devart.uservoice.com/forums/174370-securebridge