def METHOD_NAME(cls, reactor, argv):
    config = EchoOptions()
    config.parseOptions(argv)
    keys = []
    if config["identity"]:
        keyPath = os.path.expanduser(config["identity"])
        if os.path.exists(keyPath):
            keys.append(readKey(keyPath))
    knownHostsPath = FilePath(os.path.expanduser(config["knownhosts"]))
    if knownHostsPath.exists():
        knownHosts = KnownHostsFile.fromPath(knownHostsPath)
    else:
        knownHosts = None
    if config["no-agent"] or "SSH_AUTH_SOCK" not in os.environ:
        agentEndpoint = None
    else:
        agentEndpoint = UNIXClientEndpoint(reactor, os.environ["SSH_AUTH_SOCK"])
    return cls(
        reactor,
        config["host"],
        config["port"],
        config["username"],
        config["password"],
        keys,
        knownHosts,
        agentEndpoint,
    )