Stay organized with collections
Save and categorize content based on your preferences.
NAME
gdcloud compute ssh - SSH to a GDC air-gapped virtual machine.
SYNOPSIS
gdcloud compute ssh INSTANCE_NAME [flags]
EXAMPLES
To SSH to virtual machine example-instance in project projectA, run:
gdcloud compute ssh example-instance --project projectA
OPTIONAL FLAGS
--command string A command to run on the virtual machine.
Runs the command on the target instance and then exits. Example:
gcloud compute ssh example-instance --command="ps -ejH"
--ssh-flag stringArray Additional flags to be passed to ssh(1).
It is recommended that flags be passed using an assignment operator and quotes. Example:
gcloud compute ssh example-instance --ssh-flag="-vvv" --ssh-flag="-L 80:localhost:80"
--strict-host-key-checking string Override the default behavior of StrictHostKeyChecking for the connection.
By default, StrictHostKeyChecking is set to 'ask' when '--quiet' is NOT on, otherwise it is set to 'accept-new'.
Must be one of: "yes", "no", "ask", "accept-new". (default "ask")
GDCLOUD WIDE FLAGS
These flags are available to all commands: --configuration, --format, --help, --project, --quiet.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud compute ssh\u003c/code\u003e command allows users to establish an SSH connection to an air-gapped GDC virtual machine.\u003c/p\u003e\n"],["\u003cp\u003eYou can execute a specific command on the virtual machine using the \u003ccode\u003e--command\u003c/code\u003e flag without needing to open a full SSH session.\u003c/p\u003e\n"],["\u003cp\u003eAdditional SSH flags can be passed to the underlying SSH command via the \u003ccode\u003e--ssh-flag\u003c/code\u003e option for customization.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--strict-host-key-checking\u003c/code\u003e flag offers control over the host key checking behavior during the SSH connection, defaulting to 'ask' unless the quiet option is used.\u003c/p\u003e\n"],["\u003cp\u003eCommon flags like \u003ccode\u003e--project\u003c/code\u003e, \u003ccode\u003e--format\u003c/code\u003e, \u003ccode\u003e--help\u003c/code\u003e, among others, are also available for use with the \u003ccode\u003egdcloud compute ssh\u003c/code\u003e command.\u003c/p\u003e\n"]]],[],null,["# gdcloud compute ssh\n\nNAME\n----\n\ngdcloud compute ssh - SSH to a GDC air-gapped virtual machine.\n\nSYNOPSIS\n--------\n\n gdcloud compute ssh INSTANCE_NAME [flags]\n\n### EXAMPLES\n\n To SSH to virtual machine example-instance in project projectA, run:\n\n gdcloud compute ssh example-instance --project projectA\n\n### OPTIONAL FLAGS\n\n --command string A command to run on the virtual machine.\n Runs the command on the target instance and then exits. Example:\n \n gcloud compute ssh example-instance --command=\"ps -ejH\"\n --ssh-flag stringArray Additional flags to be passed to ssh(1).\n It is recommended that flags be passed using an assignment operator and quotes. Example:\n \n gcloud compute ssh example-instance --ssh-flag=\"-vvv\" --ssh-flag=\"-L 80:localhost:80\"\n --strict-host-key-checking string Override the default behavior of StrictHostKeyChecking for the connection.\n By default, StrictHostKeyChecking is set to 'ask' when '--quiet' is NOT on, otherwise it is set to 'accept-new'.\n Must be one of: \"yes\", \"no\", \"ask\", \"accept-new\". (default \"ask\")\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]