csle_common.tunneling package

Submodules

csle_common.tunneling.forward_ssh_controller module

class csle_common.tunneling.forward_ssh_controller.ForwardSSHHandler(request, client_address, server)[source]

Bases: socketserver.BaseRequestHandler

SSH Server for forwarding local port over a SSH tunnel

cleanup() None[source]

Utility method for cleaning up the SSH tunnel

Returns

None

handle() None[source]

Main loop for handing the SSH connection

Returns

None

csle_common.tunneling.forward_ssh_server module

class csle_common.tunneling.forward_ssh_server.ForwardSSHServer(server_address, RequestHandlerClass, bind_and_activate=True)[source]

Bases: socketserver.ThreadingTCPServer

SSH Server for forwarding local port over a SSH tunnel

allow_reuse_address = True
daemon_threads = True

csle_common.tunneling.forward_tunnel_thread module

class csle_common.tunneling.forward_tunnel_thread.ForwardTunnelThread(local_port: int, remote_host: str, remote_port: int, transport, tunnels_dict: Dict[str, Any] = {})[source]

Bases: threading.Thread

Thread that starts up a SSH tunnel that forwards a local port to a remote machine

run() None[source]

Starts the server

Returns

shutdown() None[source]

Shutsdown the server

Returns

None

Module contents