Options for the connect command

This page describes the datalab connect command.

Usage

datalab connect [-h] [--no-user-checking] [--port PORT]
                [--max-reconnects MAX_RECONNECTS]
                [--ssh-log-level {quiet,fatal,error,info,verbose,debug,debug1,debug2,debug3}]
                [--no-launch-browser] [--project PROJECT] [--quiet]
                [--verbosity {debug,info,warning,error,critical,none}]
                [--zone ZONE]
                NAME

datalab connect creates a persistent connection to a Datalab instance running in a Google Compute Engine VM.

This is a thin wrapper around the ssh(1) command that takes care of authentication and the translation of the instance name into an IP address.

This command ensures that the user's public SSH key is present in the project's metadata. If the user does not have a public SSH key, one is generated using ssh-keygen(1) (if the --quiet flag is given, the generated key will have an empty passphrase).

Once the connection is established, this command opens a browser window pointing at Datalab. To disable the browser opening, add the --no-launch-browser flag.

This command will attempt to re-establish the connection if it gets dropped. However, that connection will only exist while this command is running.

Options

-h/--help

Show a help message and exit

--no-user-checking

Do not check if the current user matches the Datalab instance

--port PORT

Local port on which Datalab is accessible

--max-reconnects MAX_RECONNECTS

Maximum number of times to reconnect.

A negative value means no limit.

--ssh-log-level {quiet,fatal,error,info,verbose,debug,debug1,debug2,debug3}

The log level for the SSH command.

This may be useful for debugging issues with an SSH connection.

The default log level is "error".

--no-launch-browser

Do not open a browser connected to Datalab

--project PROJECT

The Google Cloud Platform project name to use for this invocation.

If omitted then the current project is assumed.

--quiet

Do not issue any interactive prompts

--verbosity {debug,info,warning,error,critical,none}

Override the default output verbosity for this command.

--zone ZONE

The zone containing the instance. If not specified, you may be prompted to select a zone.

To avoid prompting when this flag is omitted, you can set the compute/zone property:

$ gcloud config set compute/zone ZONE

A list of zones can be fetched by running:

$ gcloud compute zones list

To unset the property, run:

$ gcloud config unset compute/zone

Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Google Cloud Datalab Documentation