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:
13
box.py
13
box.py
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user