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.

Instance Variable port Undocumented
Method __init__
Instance Variable reactor Undocumented
Instance Variable hostname Undocumented
Instance Variable command Undocumented
Instance Variable username Undocumented
Instance Variable keys Undocumented
Instance Variable password Undocumented
Instance Variable agentEndpoint Undocumented
Instance Variable knownHosts Undocumented
Instance Variable ui Undocumented
Instance Variable tty Undocumented
Method secureConnection Create and return a new SSH connection which has been secured and on which authentication has already happened.
Method cleanupConnection Clean up the connection by closing it. The command running on the endpoint has ended so the connection is no longer needed.
Method _opener Open the tty if possible, otherwise give back a file-like object from which b"no" can be read.
Class Method _knownHosts
port = (source)

Undocumented

def __init__(self, reactor, hostname, port, command, username, keys, password, agentEndpoint, knownHosts, ui, tty=FilePath(b'/dev/tty')): (source)
ParametersreactorUndocumented
hostnameUndocumented
portUndocumented
commandUndocumented
usernameUndocumented
keysUndocumented
passwordUndocumented
agentEndpointUndocumented
knownHostsUndocumented
uiUndocumented
ttyThe path of the tty device to use in case ui is None. (type: FilePath)
See AlsoSSHCommandClientEndpoint.newConnection
reactor = (source)

Undocumented

hostname = (source)

Undocumented

command = (source)

Undocumented

username = (source)

Undocumented

keys = (source)

Undocumented

password = (source)

Undocumented

agentEndpoint = (source)

Undocumented

knownHosts = (source)

Undocumented

Undocumented

Undocumented

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.

@classmethod
def _knownHosts(cls): (source)
ReturnsA KnownHostsFile instance pointed at the user's personal known hosts file. (type: KnownHostsFile)
def secureConnection(self): (source)

Create and return a new SSH connection which has been secured and on which authentication has already happened.

ReturnsA Deferred which fires with the ready-to-use connection or with a failure if something prevents the connection from being setup, secured, or authenticated.
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.

ParametersconnectionThe SSHConnection to close. (type: SSHConnection)
immediateWhether to close connection immediately. (type: bool.)
API Documentation for Twisted, generated by pydoctor 21.2.0 at 2021-02-28 21:00:42.