summaryrefslogtreecommitdiff
path: root/subplot/qemumgr.py
diff options
context:
space:
mode:
Diffstat (limited to 'subplot/qemumgr.py')
-rwxr-xr-xsubplot/qemumgr.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/subplot/qemumgr.py b/subplot/qemumgr.py
index 0550bdb..bfc3f24 100755
--- a/subplot/qemumgr.py
+++ b/subplot/qemumgr.py
@@ -8,8 +8,7 @@ import shlex
import shutil
import signal
import subprocess
-
-# import tempfile
+import tempfile
import time
@@ -37,6 +36,9 @@ class QemuSystem:
self._port = None
self._pid = None
+ fd, self._knownhosts = tempfile.mkstemp()
+ os.close(fd)
+
def _join(self, *names):
return os.path.join(self._dirname, *names)
@@ -169,7 +171,7 @@ class QemuSystem:
str(self._port),
"-l",
self._username,
- "-ouserknownhostsfile=/dev/null",
+ f"-ouserknownhostsfile={self._knownhosts}",
"-ostricthostkeychecking=accept-new",
"-opasswordauthentication=no",
]