device command ΒΆ

The device command can be used to connect to, disconnect from, and view the connection status of naisdevice. Currently, the command requires the processes naisdevice-agent and naisdevice-helper to run, both of which can be run by starting naisdevice.

connect ΒΆ

Requests a connection and waits for success. The expected result is "Connected".

bash

disconnect ΒΆ

Requests a disconnection and waits for success. The expected result is "Disconnected".

bash

status ΒΆ

Prints the current connection status of naisdevice-agent. This includes connection status, as well as gateways and their current statuses.

bash
FlagRequiredShortDefaultDescription
quietNo-qfalseOnly print connection status.
outputNo-oyamlSpecify one of yaml or json as output format

output format

If the output format and quiet flags are specified, output takes precedence.

jita ΒΆ

Starts the just-in-time access flow for a named gateway. This should redirect you to a browser to submit a request for just-in-time access.

bash
ArgumentRequiredDescription
gatewayYesThe desired gateway to establish a connection to.

Which gateways require just-in-time access?

You can view gateways and their JITA requirement with nais device status.

This snippet explicitly shows the names of gateways with that requirement.

bash

config ΒΆ

Shows and adjusts the naisdevice-agent configuration.

get ΒΆ

Shows the current naisdevice-agent configuration. Currently, there are only to config fields: AutoConnect and CertRenewal.

bash

set ΒΆ

Sets a naisdevice-agent configuration field to a desired value.

bash
ArgumentRequiredDescription
settingYesThe setting to adjust. Must be one of [autoconnect, certrenewal], case insensitive.
valueYesThe value to set. Must be one of [true, false], or anything strconv.ParseBool can parse.