class documentation
class _NewConnectionHelper: (source)
Constructor: _NewConnectionHelper(reactor, hostname, port, command, ...)
Implements interfaces: twisted.conch.endpoints._ISSHConnectionCreator
_NewConnectionHelper
implements _ISSHConnectionCreator
by establishing a brand new SSH connection, securing it, and authenticating.
Method | __init__ |
No summary |
Method | cleanup |
Clean up the connection by closing it. The command running on the endpoint has ended so the connection is no longer needed. |
Method | secure |
Create and return a new SSH connection which has been secured and on which authentication has already happened. |
Instance Variable | agent |
Undocumented |
Instance Variable | command |
Undocumented |
Instance Variable | hostname |
Undocumented |
Instance Variable | keys |
Undocumented |
Instance Variable | known |
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 |
No summary |
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: b'/dev/tty')):
(source)
¶
Any
, hostname: bytes
, port: int | None
, command: bytes
, username: bytes
, keys: list[ Key] | None
, password: bytes | None
, agentEndpoint: IStreamClientEndpoint | None
, knownHosts: str | None | KnownHostsFile
, ui: ConsoleUI | None
, tty: FilePath[ bytes] | FilePath[ str]
= FilePath(Parameters | |
reactor:Any | Undocumented |
hostname:bytes | Undocumented |
port:int | None | Undocumented |
command:bytes | Undocumented |
username:bytes | Undocumented |
keys:list[ | Undocumented |
password:bytes | None | Undocumented |
agentIStreamClientEndpoint | None | Undocumented |
knownstr | None | KnownHostsFile | Undocumented |
ui:ConsoleUI | None | Undocumented |
tty:FilePath | The path of the tty device to use in case ui is None . |
See Also | |
SSHCommandClientEndpoint.newConnection |
Clean up the connection by closing it. The command running on the endpoint has ended so the connection is no longer needed.
Parameters | |
connection:SSHConnection | The SSHConnection to close. |
immediate:bool . | Whether to close connection immediately. |
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. |