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-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003egdcloud compute ssh\u003c/code\u003e facilitates SSH access to a GDCH virtual machine.\u003c/p\u003e\n"],["\u003cp\u003eThe command requires the \u003ccode\u003eINSTANCE_NAME\u003c/code\u003e as a primary argument.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--command\u003c/code\u003e flag allows execution of a command on the remote virtual machine.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--ssh-flag\u003c/code\u003e option enables passing additional flags to the underlying \u003ccode\u003essh(1)\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--project\u003c/code\u003e flag specifies the project ID of the target virtual machine.\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/appliance/resources/gdcloud-reference/gdcloud) page."]]