Skip to content

Commit 1863fba

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Update ssh configuration doc"
2 parents ddc7c46 + d12449a commit 1863fba

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

doc/source/admin/ssh-configuration.rst

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ Configure SSH between compute nodes
66

77
.. todo::
88

9-
Consider merging this into a larger "live-migration" document or to the
9+
Consider merging this into a larger "migration" document or to the
1010
installation guide
1111

1212
If you are resizing or migrating an instance between hypervisors, you might
1313
encounter an SSH (Permission denied) error. Ensure that each node is configured
1414
with SSH key authentication so that the Compute service can use SSH to move
1515
disks to other nodes.
1616

17+
.. note::
18+
19+
It is not necessary that all the compute nodes share the same key pair.
20+
However for the ease of the configuration, this document only utilizes a
21+
single key pair for communication between compute nodes.
22+
1723
To share a key pair between compute nodes, complete the following steps:
1824

1925
#. On the first node, obtain a key pair (public key and private key). Use the
@@ -28,44 +34,36 @@ To share a key pair between compute nodes, complete the following steps:
2834
2935
# usermod -s /bin/bash nova
3036
31-
Switch to the nova account.
37+
Ensure you can switch to the nova account:
3238

3339
.. code-block:: console
3440
35-
# su nova
41+
# su - nova
3642
3743
#. As root, create the folder that is needed by SSH and place the private key
38-
that you obtained in step 1 into this folder:
44+
that you obtained in step 1 into this folder, and add the pub key to the
45+
authorized_keys file:
3946

4047
.. code-block:: console
4148
4249
mkdir -p /var/lib/nova/.ssh
4350
cp <private key> /var/lib/nova/.ssh/id_rsa
4451
echo 'StrictHostKeyChecking no' >> /var/lib/nova/.ssh/config
4552
chmod 600 /var/lib/nova/.ssh/id_rsa /var/lib/nova/.ssh/authorized_keys
53+
echo <pub key> >> /var/lib/nova/.ssh/authorized_keys
4654
47-
#. Repeat steps 2-4 on each node.
48-
49-
.. note::
50-
51-
The nodes must share the same key pair, so do not generate a new key pair
52-
for any subsequent nodes.
53-
54-
#. From the first node, where you created the SSH key, run:
55+
#. Copy the whole folder created in step 4 to the rest of the nodes:
5556

5657
.. code-block:: console
5758
58-
ssh-copy-id -i <pub key> nova@remote-host
59-
60-
This command installs your public key in a remote machine's
61-
``authorized_keys`` folder.
59+
# scp -r /var/lib/nova/.ssh remote-host:/var/lib/nova/
6260
6361
#. Ensure that the nova user can now log in to each node without using a
6462
password:
6563

6664
.. code-block:: console
6765
68-
# su nova
66+
# su - nova
6967
$ ssh *computeNodeAddress*
7068
$ exit
7169

0 commit comments

Comments
 (0)