'Takes a string like \'-o Foo=1 -o Bar="foo bar"\' and returns a
list [\'-o\', \'Foo=1\', \'-o\', \'Bar=foo bar\'] that can be added to
the argument list. The list will not contain any empty elements.'

@staticmethod
def _split_ssh_args(argstring):

    try:
        return [to_text(x.strip()) for x in shlex.split(to_bytes(argstring)) if x.strip()]
    except AttributeError:
        return [to_text(x.strip()) for x in shlex.split(argstring) if x.strip()]
