def _ssh_ls(ssh_bin, address, ec2_key_pair_file, path, keyfile=None, sudo=False):
 cmd_args = ['find', '-L', path, '-type', 'f']
 if sudo:
  cmd_args = (['sudo'] + cmd_args)
 out = to_string(_check_output(*_ssh_run_with_recursion(ssh_bin, address, ec2_key_pair_file, keyfile, cmd_args)))
 if ('No such file or directory' in out):
  raise IOError(('No such file or directory: %s' % path))
 return out.split('\n')

def _ssh_ls ( ssh_bin , address , ec2_key_pair_file , path , keyfile = None , sudo = False ) : cmd_args = [ 'find' , '-L' , path , '-type' , 'f' ] if sudo : cmd_args = ( [ 'sudo' ] + cmd_args ) out = to_string ( _check_output ( * _ssh_run_with_recursion ( ssh_bin , address , ec2_key_pair_file , keyfile , cmd_args ) ) ) if ( 'No such file or directory' in out ) : raise IOError ( ( 'No such file or directory: %s' % path ) ) return out . split ( '\n' )
recursively list files under path on the specified ssh host .