mirror of
https://github.com/gryf/boxpy.git
synced 2025-12-19 13:37:58 +01:00
Added debug info about ssh connection to the vm
This commit is contained in:
13
box.py
13
box.py
@@ -1470,11 +1470,14 @@ def connect(args):
|
|||||||
return 16
|
return 16
|
||||||
|
|
||||||
username = conf.username or DISTROS[conf.distro]["username"]
|
username = conf.username or DISTROS[conf.distro]["username"]
|
||||||
return Run(['ssh', '-o', 'StrictHostKeyChecking=no',
|
cmd = ['ssh', '-o', 'StrictHostKeyChecking=no',
|
||||||
'-o', 'UserKnownHostsFile=/dev/null',
|
'-o', 'UserKnownHostsFile=/dev/null',
|
||||||
'-i', conf.ssh_key_path[:-4],
|
'-i', conf.ssh_key_path[:-4],
|
||||||
f'ssh://{username}'
|
f'ssh://{username}'
|
||||||
f'@localhost:{conf.port}'], False).returncode
|
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):
|
def _set_vmstate(name, state):
|
||||||
|
|||||||
Reference in New Issue
Block a user