diff options
Diffstat (limited to 'morphlib/writeexts.py')
-rw-r--r-- | morphlib/writeexts.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/morphlib/writeexts.py b/morphlib/writeexts.py index ab451d14..270cade9 100644 --- a/morphlib/writeexts.py +++ b/morphlib/writeexts.py @@ -605,12 +605,16 @@ class WriteExtension(cliapp.Application): def check_ssh_connectivity(self, ssh_host): try: - cliapp.ssh_runcmd(ssh_host, ['true']) + output = cliapp.ssh_runcmd(ssh_host, ['echo', 'test']) except cliapp.AppException as e: logging.error("Error checking SSH connectivity: %s", str(e)) raise cliapp.AppException( 'Unable to SSH to %s: %s' % (ssh_host, e)) + if output.strip() != 'test': + raise cliapp.AppException( + 'Unexpected output from remote machine: %s' % output.strip()) + def is_device(self, location): try: st = os.stat(location) |