When setting up the SSH server, first of all the storage should be set. It is used to store keys and user list that can connect to the server.


Storage setup

Place the TScFileStorage or TScRegStorage component onto the form.
Specify the path to store information about keys and users in the Path or KeyPath property.

First of all you should create a pair of keys that will be used for authentication server by the client.


Keys generating

Open the editor of the storage object (double click on the component) and go to the Keys page.
Press the New button to add a new key.
Select an algorithm and a key length.
Press the Generate button to generate a new key. A pair of keys must be created for the each used asymmetric algorithm.
Pass the created public key to the server (see the Keys transferring topic).

It is required to add to the storage the information about the each user that will be connected to the SSH server.


Users creation

Open the Users page of the storage editor.
Press the New button to create a new user.
Specify the user name.
Select available authentication methods.
If the authentication by a password is used, specify a password for the user. This password should by pretty complicated to be hard to crack it.
If the authentication by a public key is used, specify the key for the user. This key is generated by the client and should be passed to the server carefully  (see the Keys transferring topic). Press the "Import from..." button to import the key from a file.


SSH server setup

Place the TScSSHServer component onto the form.
Select required storage in the Storage property.
Specify names of the generated server keys for the RSA or DSA algorithm in the KeyNameRSA or KeyNameDSA property correspondingly.
Start the SSH server by setting the Active property to True.


SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support