Class | Net::SSH::Service::Forward::Driver |
In: |
lib/net/ssh/service/forward/driver.rb
|
Parent: | Object |
The Forward::Driver class manages ports that have been forwarded. It will open a socket on each local port and listen for local connections, forwarding those connections over an SSH channel to the other end.
direct_channel_count | [R] | The number of direct (local-to-remote) channels that have been opened. |
open_direct_channel_count | [R] | The number of direct (local-to-remote) channels that are currently open. |
Return an array of the active forwarded local connections. Each element of the array is another array containing the local port, and the remote host and port of the connection.
Return an array of the active forwarded remote connections. Each element of the array is an integer representing the port number of the remote host that is being forwarded to the local client.
Cease forwarding connections from the given local port (and interface). The parameters must match those given to a prior call to local. Existing forwarded connections are not affected by this call, but no more connections will be accepted on the local port.
Cease forwarding connections from the given remote port. The remote_host parameter must match the corresponding parameter that was passed to remote. Existing forwarded connections are not affected by this call, but no more connections will be forwarded from the remote host to the local host via that port.
Open a direct "tcpip" channel to the remote machine, which will then forward the connection to the given remote-host and remote-port. The connection will appear to have come from the given port on the local machine.
The handler object may respond to the following messages, in order to respond to requests over the channel:
Only the process method is required—the others will only be invoked if the handler responds to them.
Forward connections on the given local port, to the given remote host and remote port.
This method will return immediately, forwarding the connections asynchronously.
Initiate forwarding of the given remote port on the connected host. Forwarded packets will be passed to the given block as they are recieved. The remote-host represents the address that should be bound on the remote host, and defaults to ‘127.0.0.1’.