[cfg01] Use ssh config to set default user & key 51/66851/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 4 Feb 2019 15:03:06 +0000 (16:03 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 4 Feb 2019 15:03:06 +0000 (16:03 +0100)
Change-Id: I7486569568207f7652f8bdfcf1060ce51a9dbb0e
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
docs/release/userguide/userguide.rst
mcp/scripts/docker-compose/files/entrypoint.sh

index 5ec63db..25b5e13 100644 (file)
@@ -360,9 +360,12 @@ Logging in to cluster nodes is possible from the Jumpserver, Salt Master etc.
     ``/etc/hosts`` on ``cfg01`` has all the cluster hostnames, which can be
     used instead of IP addresses.
 
+    ``/root/.ssh/config`` on ``cfg01`` configures the default user and key:
+    ``ubuntu``, respectively ``/root/fuel/mcp/scripts/mcp.rsa``.
+
 .. code-block:: console
 
-    root@cfg01:~$ ssh -i ~/fuel/mcp/scripts/mcp.rsa ubuntu@ctl01
+    root@cfg01:~$ ssh ctl01
 
 Debugging ``MaaS`` Comissioning/Deployment Issues
 =================================================
index eb549bc..9830ea1 100755 (executable)
@@ -16,6 +16,9 @@ fi
 if [ ! -f /home/ubuntu/.ssh/authorized_keys ]; then
     install -D -o ubuntu /root/fuel/mcp/scripts/mcp.rsa.pub \
                          /home/ubuntu/.ssh/authorized_keys
+    mkdir -p /root/.ssh/
+    echo 'User ubuntu' > /root/.ssh/config
+    echo 'IdentityFile /root/fuel/mcp/scripts/mcp.rsa' >> /root/.ssh/config
 fi
 
 if ! grep -q localhost /etc/hosts; then