twisted.conch.endpoints._NewConnectionHelper(object)
class documentationtwisted.conch.endpoints
View Source
(View In Hierarchy)
Implements interfaces: twisted.conch.endpoints._ISSHConnectionCreator
_NewConnectionHelper
implements _ISSHConnectionCreator
by establishing a brand new SSH connection, securing it, and
authenticating.
Method | __init__ | |
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 |
Parameters | tty | The path of the tty device to use in case ui is
None . (type: FilePath ) |
See Also | SSHCommandClientEndpoint.newConnection |
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
.
Returns | A KnownHostsFile
instance pointed at the user's personal known hosts file. |
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. |
Clean up the connection by closing it. The command running on the endpoint has ended so the connection is no longer needed.
Parameters | connection | The SSHConnection
to close. (type: SSHConnection ) |
immediate | Whether to close connection immediately. (type: bool .) |