Create and return a new endpoint which will try to create a new connection to an SSH server and run a command over it. It will also close the connection if there are problems leading up to the command being executed, after the command finishes, or if the connection Deferred is cancelled.

ParametersreactorThe reactor to use to establish the connection. (type: IReactorTCP provider)
commandSee __init__'s command argument.
usernameThe username with which to authenticate to the SSH server. (type: bytes)
hostnameThe hostname of the SSH server. (type: bytes)
portThe port number of the SSH server. By default, the standard SSH port number is used. (type: int)
keysPrivate keys with which to authenticate to the SSH server, if key authentication is to be attempted (otherwise None). (type: list of Key)
passwordThe password with which to authenticate to the SSH server, if password authentication is to be attempted (otherwise None). (type: bytes or None)
agentEndpointAn IStreamClientEndpoint provider which may be used to connect to an SSH agent, if one is to be used to help with authentication. (type: IStreamClientEndpoint provider)
knownHostsThe currently known host keys, used to check the host key presented by the server we actually connect to. (type: KnownHostsFile)
uiAn object for interacting with users to make decisions about whether to accept the server host keys. If None, a ConsoleUI connected to /dev/tty will be used; if /dev/tty is unavailable, an object which answers b"no" to all prompts will be used. (type: None or ConsoleUI)
ReturnsA new instance of cls (probably SSHCommandClientEndpoint).
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.