MT#16489 Fix plain vagrant VMs (enable ssh key /root/.ssh/sipwise_vagrant_key)

Sipwise systems/VMs works well because we rebuild /etc/ssh/sshd_config
from templates and enable supporting /root/.ssh/sipwise_vagrant_key
while for plain VMs we do nothing, so we have to handle it here.

Change-Id: Ib7eccda1a8b9692da6e581aef47c3ccddeb229f6
changes/92/3492/4
Alexander Lutay 10 years ago
parent 35df7a5617
commit 034b6d3012

@ -2036,6 +2036,7 @@ vagrant_configuration() {
mkdir -p "${TARGET}/root/.ssh/"
cat "${ngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/root/.ssh/sipwise_vagrant_key"
chroot "${TARGET}" chmod 0600 /root/.ssh/sipwise_vagrant_key
sed -i 's|^[#\s]*\(AuthorizedKeysFile.*\)$|\1 %h/.ssh/sipwise_vagrant_key|g' "${TARGET}/etc/ssh/sshd_config"
# see https://github.com/mitchellh/vagrant/issues/1673
# and https://bugs.launchpad.net/ubuntu/+source/xen-3.1/+bug/1167281

Loading…
Cancel
Save