connect commands

Connect commands are used to connect via SSH to network elements in the Digital Sandbox deployment.

The following CLI connect commands are available:

dsctl

    — connect

dsctl connect

Synopsis

dsctl connect {-n <name_string> | -e <expression_string>} -i <ID_string> [-z <IPaddress_string>] [-o <ssh_opt_string>]

Description

The dsctl connect command is used to connect to a network element in a Digital Sandbox deployment.

By default, the system uses kubectl exec to connect to the network element. If that fails, the system tries to connect using SSH.

Options

The following are dsctl connect parameters:

Parameter:

-n <name_string>

Used with operation:

connect

Description:

Exact name of the network element to connect to. Cannot be used with the -e flag.

Parameter:

-e <expression_string>

Used with operation:

connect

Description:

Name (or part of) the network element to connect to. For example, if the network element is ‟dut-alpha", a valid expression could be ‟-e alpha". Cannot be used with the -n flag.

Parameter:

-i <ID_string>

Used with operation:

connect

Description:

Specifies the Digital Sandbox deployment ID. Mandatory field.

Parameter:

-z <IPaddress_string>

Used with operation:

connect

Description:

Specifies the IP address of the kubernetes node to connect to.

Parameter:

-0 <ssh_opt_string>

Used with operation:

connect

Description:

Specifies an option that can be passed to an SSH command. The option string must be enclosed in single or double quotes.

Examples

To connect to a Digital Sandbox network element with a deployment ID of ‟star” and a network element name of ‟networkelement1”:

dsctl connect -i star -n networkelement1

To connect to a Digital Sandbox network element with a deployment ID of ‟star” and a unique shortened version of the network element name ‟dut2":

dsctl connect -i star -e dut2

To connect to a Digital Sandbox network element with a deployment ID of ‟star”, a unique shortened version of the network element name ‟dut1", and a connection timeout value option of ‟10" (passed to an ssh command):

dsctl connect -i star -e dut1 -o "-o connectTimeout=10"