TT#37257 Get ssh pub key from mgmt node

We need it to be able to connect from mgmt node to installed one
to run 'ngcp-initial-configuration'.

Change-Id: Id907094ba2eae32c05ad8d42d8a504e498a57ad4
changes/32/23432/4
Mykola Malkov 8 years ago
parent 5fcd5f265d
commit 65338bde34

@ -1452,6 +1452,18 @@ EOT
fi
fi
if [[ -n "${MANAGEMENT_IP}" ]] && "${RETRIEVE_MGMT_CONFIG}" ; then
echo "Retrieving public key from management node"
cat > "${TARGET}/tmp/retrieve_authorized_keys.sh" << EOT
#!/bin/bash
set -e
mkdir -p /root/.ssh
wget --timeout=30 -O /root/.ssh/authorized_keys "http://${MANAGEMENT_IP}:3000/ssh/id_rsa_pub"
chmod 600 /root/.ssh/authorized_keys
EOT
grml-chroot "${TARGET}" /bin/bash /tmp/retrieve_authorized_keys.sh
fi
case "$DEBIAN_RELEASE" in
stretch)
set_custom_grub_boot_options

Loading…
Cancel
Save