311
1.877.877.2269
BLACKBOX.COM
NEED HELP?
LEAVE THE TECH TO US
LIVE 24/7
TECHNICAL
SUPPORT
1.877.877.2269
CHAPTER 16: ADVANCED CONFIGURATION
For simplicity going forward the term private key will be used to refer to either id_rsa or id_dsa and public key to refer to either id_rsa.
pub or id_dsa.pub.
To generate the keys use the ssh-keygen program (part of the OpenSSH suite):
$ ssh-keygen -t [rsa|dsa]
Generating public/private [rsa|dsa] key pair.
Enter file in which to save the key (/home/user/.ssh/id_[r|dsa]):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_[r|dsa].
Your public key has been saved in /home/user/.ssh/id_[r|dsa].pub.
The key fingerprint is:
28:aa:29:38:ba:40:f4:11:5e:3f:d4:fa:e5:36:14:d6 user@server
$
It is advisable to create a new directory to store your generated keys. It is also possible to name the files after the device
they will be used for. For example:
$ mkdir keys
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key: ~/keys/control_room
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ~/keys/control_room
Your public key has been saved in ~/keys/control_room.pub.
The key fingerprint is:
28:aa:29:38:ba:40:f4:11:5e:3f:d4:fa:e5:36:14:d6 user@server
$
There must be no password associated with the keys. If there is a password, Black Box devices will have no way to supply it
at runtime.
Authorized keys
If the console server selected to be the server has only one client device, the authorized_keys file is simply a copy of the public key for
that device.
If one or more devices will be clients of the console server, the authorized_keys file will contain copies of all of the public keys.
RSA and DSA keys may be freely mixed in the authorized_keys file. For example, assume we already have one server, called bridge_
server, and two sets of keys, for the control_room and the plant_entrance. The following commands 1) show the stored keys and 2)
combine two of them into a single file, authorized_keys_bridge_server.
$ ls /home/user/keys
control_room
control_room.pub
plant_entrance