Class t.c.s.c.SSHConnection(service.SSHService):

Part of twisted.conch.ssh.connection View Source View In Hierarchy

Known subclasses: twisted.conch.scripts.cftp.SSHConnection, twisted.conch.scripts.conch.SSHConnection, twisted.conch.scripts.tkconch.SSHConnection

No class docstring
Method __init__ Undocumented
Method serviceStarted called when the service is active on the transport.
Method serviceStopped called when the service is stopped, either by the connection ending
Method ssh_GLOBAL_REQUEST Undocumented
Method ssh_REQUEST_SUCCESS Undocumented
Method ssh_REQUEST_FAILURE Undocumented
Method ssh_CHANNEL_OPEN Undocumented
Method ssh_CHANNEL_OPEN_CONFIRMATION Undocumented
Method ssh_CHANNEL_OPEN_FAILURE Undocumented
Method ssh_CHANNEL_WINDOW_ADJUST Undocumented
Method ssh_CHANNEL_DATA Undocumented
Method ssh_CHANNEL_EXTENDED_DATA Undocumented
Method ssh_CHANNEL_EOF Undocumented
Method ssh_CHANNEL_CLOSE Undocumented
Method ssh_CHANNEL_REQUEST Undocumented
Method _cbChannelRequest Undocumented
Method _ebChannelRequest Undocumented
Method ssh_CHANNEL_SUCCESS Undocumented
Method ssh_CHANNEL_FAILURE Undocumented
Method sendGlobalRequest Send a global request for this connection. Current this is only used
Method openChannel Open a new channel on this connection.
Method sendRequest Send a request to a channel.
Method adjustWindow Tell the other side that we will receive more data. This should not
Method sendData Send data to a channel. This should not normally be used: instead use
Method sendExtendedData Send extended data to a channel. This should not normally be used:
Method sendEOF Send an EOF (End of File) for a channel.
Method sendClose Close a channel.
Method getChannel The other side requested a channel of some sort.
Method gotGlobalRequest We got a global request. pretty much, this is just used by the client
Method channelClosed Called when a channel is closed.

Inherited from SSHService:

Method logPrefix Override this method to insert custom logging behavior. Its
Method packetReceived called when we receieve a packet on the transport
def __init__(self): (source)
Undocumented
def serviceStarted(self): (source)
called when the service is active on the transport.
def serviceStopped(self): (source)
called when the service is stopped, either by the connection ending or by another service being started
def ssh_GLOBAL_REQUEST(self, packet): (source)
Undocumented
def ssh_REQUEST_SUCCESS(self, packet): (source)
Undocumented
def ssh_REQUEST_FAILURE(self, packet): (source)
Undocumented
def ssh_CHANNEL_OPEN(self, packet): (source)
Undocumented
def ssh_CHANNEL_OPEN_CONFIRMATION(self, packet): (source)
Undocumented
def ssh_CHANNEL_OPEN_FAILURE(self, packet): (source)
Undocumented
def ssh_CHANNEL_WINDOW_ADJUST(self, packet): (source)
Undocumented
def ssh_CHANNEL_DATA(self, packet): (source)
Undocumented
def ssh_CHANNEL_EXTENDED_DATA(self, packet): (source)
Undocumented
def ssh_CHANNEL_EOF(self, packet): (source)
Undocumented
def ssh_CHANNEL_CLOSE(self, packet): (source)
Undocumented
def ssh_CHANNEL_REQUEST(self, packet): (source)
Undocumented
def _cbChannelRequest(self, result, localChannel): (source)
Undocumented
def _ebChannelRequest(self, result, localChannel): (source)
Undocumented
def ssh_CHANNEL_SUCCESS(self, packet): (source)
Undocumented
def ssh_CHANNEL_FAILURE(self, packet): (source)
Undocumented
def sendGlobalRequest(self, request, data, wantReply=0): (source)
Send a global request for this connection. Current this is only used for remote->local TCP forwarding.
Parametersrequest(type: str )
data(type: str )
wantReply(type: bool @rtype Deferred/None )
def openChannel(self, channel, extra=''): (source)
Open a new channel on this connection.
Parameterschannel(type: subclass of SSHChannel )
extra(type: str )
def sendRequest(self, channel, requestType, data, wantReply=0): (source)
Send a request to a channel.
Parameterschannel(type: subclass of SSHChannel )
requestType(type: str )
data(type: str )
wantReply(type: bool @rtype Deferred/None )
def adjustWindow(self, channel, bytesToAdd): (source)
Tell the other side that we will receive more data. This should not normally need to be called as it is managed automatically.
Parameterschannel(type: subclass of SSHChannel )
bytesToAdd(type: int )
def sendData(self, channel, data): (source)
Send data to a channel. This should not normally be used: instead use channel.write(data) as it manages the window automatically.
Parameterschannel(type: subclass of SSHChannel )
data(type: str )
def sendExtendedData(self, channel, dataType, data): (source)
Send extended data to a channel. This should not normally be used: instead use channel.writeExtendedData(data, dataType) as it manages the window automatically.
Parameterschannel(type: subclass of SSHChannel )
dataType(type: int )
data(type: str )
def sendEOF(self, channel): (source)
Send an EOF (End of File) for a channel.
Parameterschannel(type: subclass of SSHChannel )
def sendClose(self, channel): (source)
Close a channel.
Parameterschannel(type: subclass of SSHChannel )
def getChannel(self, channelType, windowSize, maxPacket, data): (source)

The other side requested a channel of some sort. channelType is the type of channel being requested, windowSize is the initial size of the remote window, maxPacket is the largest packet we should send, data is any other packet data (often nothing).

We return a subclass of SSHChannel.

By default, this dispatches to a method 'channel_channelType' with any non-alphanumerics in the channelType replace with _'s. If it cannot find a suitable method, it returns an OPEN_UNKNOWN_CHANNEL_TYPE error. The method is called with arguments of windowSize, maxPacket, data.
ParameterschannelType(type: str )
windowSize(type: int )
maxPacket(type: int )
data(type: str )
Returns(type: subclass of SSHChannel/tuple )
def gotGlobalRequest(self, requestType, data): (source)
We got a global request. pretty much, this is just used by the client to request that we forward a port from the server to the client. Returns either:
  • 1: request accepted
  • 1, <data>: request accepted with request specific data
  • 0: request denied
By default, this dispatches to a method 'global_requestType' with -'s in requestType replaced with _'s. The found method is passed data. If this method cannot be found, this method returns 0. Otherwise, it returns the return value of that method.
ParametersrequestType(type: str )
data(type: str )
Returns(type: int/tuple )
def channelClosed(self, channel): (source)
Called when a channel is closed. It clears the local state related to the channel, and calls channel.closed(). MAKE SURE YOU CALL THIS METHOD, even if you subclass SSHConnection. If you don't, things will break mysteriously.
API Documentation for twisted, generated by pydoctor.