Exécutez la commande gcloud compute ssh dans une fenêtre de terminal local ou depuis Cloud Shell pour vous connecter à un nœud de VM de cluster à l'aide de SSH.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eYou can establish an SSH session on a Dataproc cluster node through either the Google Cloud console or the Google Cloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud console allows you to connect via SSH by navigating to the VM Instances page and selecting the SSH option for the desired Dataproc VM.\u003c/p\u003e\n"],["\u003cp\u003eUsing the Google Cloud CLI, the \u003ccode\u003egcloud compute ssh\u003c/code\u003e command can be utilized to connect to a cluster VM node, specifying the VM name, zone, and project ID.\u003c/p\u003e\n"],["\u003cp\u003eAn SSH connection can be established to a Dataproc cluster node directly from the \u003cstrong\u003eVM Instances\u003c/strong\u003e tab on the Dataproc \u003cstrong\u003eCluster details\u003c/strong\u003e page.\u003c/p\u003e\n"]]],[],null,["You can open an SSH session on a Dataproc cluster node\nusing the Google Cloud console or Google Cloud CLI.\nSee [Cluster web interfaces](/dataproc/docs/concepts/accessing/cluster-web-interfaces) to establish a connection to a web interface running on a cluster master node. \n\nConsole\n\n1. In the Google Cloud console, go to the [**VM Instances**](https://console.cloud.google.com/compute/instances) page.\n2. In the list of virtual machine instances, click **SSH** in the row of the Dataproc VM instance that you want to connect to.\n\nA browser window opens in your home directory on the node. \n\n```\nConnected, host fingerprint: ssh-rsa ...\nLinux cluster-1-m 3.16.0-0.bpo.4-amd64 ...\n...\nuser@cluster-1-m:~$\n```\n| You can also connect using SSH to a Dataproc cluster node from the **VM Instances** tab on the Dataproc **Cluster details** page in the Google Cloud console.\n\nGoogle Cloud CLI\n\nRun the [gcloud compute ssh](/sdk/gcloud/reference/compute/ssh)\ncommand in a local terminal window or from\n[Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\nto connect using SSH to a cluster VM node. \n\n```\ngcloud compute ssh cluster-VM-name\\\n --zone=zone \\\n --project=project-id\n```\n\nExample (the default name for the master node is the cluster name followed\nby an `-m` suffix): \n\n```\ngcloud compute ssh cluster-1-m \\\n --zone=us-central-1-a \\\n --project=my-project-id\n...\nLinux cluster-1-m 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6...\n...\nuser@cluster-1-m:~$\n```"]]