nimblebox logo
Docs
v2.1.0

nbox.sub_utils.ssh

Creates a socket tunnel between users localhost to server called RSockServer (Reverse Socket Server) .

nbx tunnel 8000 --i "nbox-dev"

If you find yourself using this reach out to NimbleBox support.

Functions

iconfunctionport_in_use
[source]
iconfunction_create_threads
[source]
iconfunctiontunnel
[source]
(port:None,*apps_to_ports:None,i:str)
Parameters
  • port -

    Local port for terminal

  • *apps_to_ports -

    A tuple of values buildport:localport. For example, jupyter:8888 or 2001:8002

  • i -

    The instance to connect to

the nbox way to SSH into your instance. Usage: nbx tunnel 8000 -i "nbox-dev"

Classes

iconclassRSockClient
[source]
iconfunction__init__
[source]
(client_socket:None,instance:None,instance_port:None,auth:None,secure:None)
Parameters
  • client_socket -

    The socket that the client is connected to.

  • instance -

    The instance that the client wants to connect to.

  • instance_port -

    The port that the instance is listening on.

  • auth -

    The authentication token that the client has to provide to connect to the RSockServer.

  • secure -

    Whether or not the client is using SSL.

Initializes a reverse sockets client.

iconfunction__repr__
[source]
iconfunctionlog
[source]
iconfunctionconnect_to_rsock_server
[source]

Connects to RSockServer.

iconfunctionauthenticate
[source]

Authenticates the client. Sends "AUTH~{AUTH_TOKEN}" to RSockServer.

iconfunctionconnect
[source]

Connects the client to RSockServer. Sends "CONNECT" to RSockServer.

iconfunctionclient_stream
[source]
iconfunctionserver_stream
[source]
iconfunctionstop
[source]

Stops the client.

iconclassConnectionManager
[source]
iconfunction__init__
[source]

Args: localport: The port that the client will be listening on. user: The user that the client will be connecting as. subdomain: The subdomain that the client will be connecting to. port: The port that the server will be listening on. auth: The build auth token that the client will be using. notsecure: Whether or not to use SSL.

iconfunction__repr__
[source]
iconfunctionadd
[source]

Adds a client to the list of clients.

iconfunctionstart
[source]
iconfunctionquit
[source]
nbox SDKnbox provides built in access to all the APIs and packages them in the most user friendly manner.Star 0