1
0
mirror of https://github.com/gryf/boxpy.git synced 2025-12-18 13:00:17 +01:00

Added debug info about ssh connection to the vm

This commit is contained in:
2023-02-22 21:08:43 +01:00
parent f0282874f8
commit 1483f49461

13
box.py
View File

@@ -1470,11 +1470,14 @@ def connect(args):
return 16
username = conf.username or DISTROS[conf.distro]["username"]
return Run(['ssh', '-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
'-i', conf.ssh_key_path[:-4],
f'ssh://{username}'
f'@localhost:{conf.port}'], False).returncode
cmd = ['ssh', '-o', 'StrictHostKeyChecking=no',
'-o', 'UserKnownHostsFile=/dev/null',
'-i', conf.ssh_key_path[:-4],
f'ssh://{username}'
f'@localhost:{conf.port}']
LOG.debug('Connecting to vm `%s` using command:\n%s', args.name,
' '.join(cmd))
return Run(cmd, False).returncode
def _set_vmstate(name, state):