class documentation

class _NewConnectionHelper: (source)

Implements interfaces: twisted.conch.endpoints._ISSHConnectionCreator

View In Hierarchy

_NewConnectionHelper implements _ISSHConnectionCreator by establishing a brand new SSH connection, securing it, and authenticating.
Method __init__
Method cleanup​Connection Clean up the connection by closing it. The command running on the endpoint has ended so the connection is no longer needed.
Method secure​Connection Create and return a new SSH connection which has been secured and on which authentication has already happened.
Instance Variable agent​Endpoint Undocumented
Instance Variable command Undocumented
Instance Variable hostname Undocumented
Instance Variable keys Undocumented
Instance Variable known​Hosts Undocumented
Instance Variable password Undocumented
Instance Variable port Undocumented
Instance Variable reactor Undocumented
Instance Variable tty Undocumented
Instance Variable ui Undocumented
Instance Variable username Undocumented
Class Method _known​Hosts
Method _opener Open the tty if possible, otherwise give back a file-like object from which b"no" can be read.
def __init__(self, reactor, hostname, port, command, username, keys, password, agentEndpoint, knownHosts, ui, tty=FilePath(b'/dev/tty')): (source)
Parameters
reactorUndocumented
hostnameUndocumented
portUndocumented
commandUndocumented
usernameUndocumented
keysUndocumented
passwordUndocumented
agent​EndpointUndocumented
known​HostsUndocumented
uiUndocumented
tty:FilePathThe path of the tty device to use in case ui is None.
See Also
SSHCommandClientEndpoint.newConnection
def cleanupConnection(self, connection, immediate): (source)
Clean up the connection by closing it. The command running on the endpoint has ended so the connection is no longer needed.
Parameters
connection:SSHConnectionThe SSHConnection to close.
immediate:bool.Whether to close connection immediately.
def secureConnection(self): (source)
Create and return a new SSH connection which has been secured and on which authentication has already happened.
Returns
A Deferred which fires with the ready-to-use connection or with a failure if something prevents the connection from being setup, secured, or authenticated.
agentEndpoint = (source)

Undocumented

command = (source)

Undocumented

hostname = (source)

Undocumented

keys = (source)

Undocumented

knownHosts = (source)

Undocumented

password = (source)

Undocumented

port = (source)

Undocumented

reactor = (source)

Undocumented

Undocumented

Undocumented

username = (source)

Undocumented

@classmethod
def _knownHosts(cls): (source)
Returns
KnownHostsFileA KnownHostsFile instance pointed at the user's personal known hosts file.
def _opener(self): (source)

Open the tty if possible, otherwise give back a file-like object from which b"no" can be read.

For use as the opener argument to ConsoleUI.