summaryrefslogtreecommitdiff
path: root/vm-libvirt.sh
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-04-01 10:32:30 +0300
committerLars Wirzenius <liw@liw.fi>2020-04-01 10:32:30 +0300
commit46a8e601f4166af5671acbae87a543d129c0b3cf (patch)
treecb21f73fbb77c1c6f4b595734b387da574a7ace0 /vm-libvirt.sh
parentac88fa50e815fa6e96decd254a2e3b86bb8d749d (diff)
downloadick-contractor-46a8e601f4166af5671acbae87a543d129c0b3cf.tar.gz
Change: configure SSH to know about new VM
Diffstat (limited to 'vm-libvirt.sh')
-rwxr-xr-xvm-libvirt.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm-libvirt.sh b/vm-libvirt.sh
index c5788af..2a7a05e 100755
--- a/vm-libvirt.sh
+++ b/vm-libvirt.sh
@@ -101,5 +101,13 @@ do
fi
done
+# Write ssh config file with VM info.
+cat > "$HOME/.ssh/config-local" <<EOF
+Host $name
+ Hostname $ip
+ UserKnownHostsFile /dev/null
+ StrictHostKeyChecking no
+EOF
+
# Done.
echo "Virtual machine $name ($ip) has been created and started."