aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-09-22 16:15:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-09-22 16:15:11 -0300
commit82fe11b724beff3d6fa7a5c9f82fdba86902e397 (patch)
treec22621e4aeca5ec25862c50ac6c3f748ab72e8d2
parent063df2c9c268426a334bc50d2a1461c0284f34ef (diff)
downloadkvmx-82fe11b724beff3d6fa7a5c9f82fdba86902e397.tar.gz
kvmx-82fe11b724beff3d6fa7a5c9f82fdba86902e397.tar.bz2
Fix hostname in keys at kvmx-create
-rwxr-xr-xkvmx-create3
1 files changed, 3 insertions, 0 deletions
diff --git a/kvmx-create b/kvmx-create
index abcec83..8b30e83 100755
--- a/kvmx-create
+++ b/kvmx-create
@@ -366,6 +366,9 @@ EOF
$APT_INSTALL openssh-server -y
kvmx_sudo_run chroot $WORK/ service ssh stop
+ # Fix hostname in keys
+ kvmx_sudo_run sed -i -e "s/root@.*$/root@$hostname.$domain/" $WORK/etc/ssh/*.pub
+
# Sudo
echo "Installing sudo..."
$APT_INSTALL sudo -y