Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
SSH-Schlüssel für einen Server einrichten
Sie können SSH-Schlüssel für Ihren Bare-Metal-Lösungsserver einrichten.
Das Einrichten von SSH-Schlüsseln ist optional. Sie können sie beim Bereitstellen eines neuen Servers oder beim Reimaging eines vorhandenen Servers festlegen.
Bevor Sie den Serverbereitstellungsprozess starten, müssen Sie die SSH-Schlüssel haben.
Die von Ihnen angegebenen öffentlichen SSH-Schlüssel werden als autorisierte Schlüssel für die Anmeldung bei Ihrem Bare-Metal-Lösungsserver verwendet.
Sie müssen den Cloud KMS-Schlüssel in demselben Projekt erstellen, das Ihren Bare-Metal-Lösung-Server enthält.
Wenn Sie SSH-Schlüssel verwenden möchten, benötigen Sie mindestens einen öffentlichen SSH-Schlüssel. Der öffentliche Schlüssel muss eine ssh-rsa-Typsignatur haben:
Registrieren Sie Ihre SSH-Schlüssel in dem Projekt, das Ihren Bare-Metal-Lösungsserver enthält. Folgen Sie der Anleitung unter SSH-Schlüssel registrieren.
SSH-Schlüssel beim Bereitstellen eines Servers einrichten
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-19 (UTC)."],[[["\u003cp\u003eSetting up SSH keys for Bare Metal Solution servers is optional and can be done during the provisioning of a new server or while reimaging an existing one.\u003c/p\u003e\n"],["\u003cp\u003eBefore setting up SSH keys, you must create them, ensuring they are of \u003ccode\u003essh-rsa\u003c/code\u003e type, and register them in the same project as your Bare Metal Solution server.\u003c/p\u003e\n"],["\u003cp\u003eSSH keys can be added through the Google Cloud console intake form when provisioning a new server, or during the reimaging process as detailed in the server OS change instructions.\u003c/p\u003e\n"],["\u003cp\u003eYou can view the SSH keys associated with a specific server either through the Google Cloud console's Servers page or using the \u003ccode\u003egcloud alpha bms instances auth-info\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eAccess to the server with SSH keys is managed through the \u003ccode\u003ecustomeradmin\u003c/code\u003e user account.\u003c/p\u003e\n"]]],[],null,["# Set up SSH keys for a server\n============================\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can set up SSH keys for your Bare Metal Solution server.\n\nIt's optional to set up SSH keys. You can set them while provisioning a new\nserver or while reimaging an existing one.\n\nThis feature is available only for the\n[Linux OSes supported by Bare Metal Solution](/bare-metal/docs/bms-planning#linux).\n\nBefore you begin\n----------------\n\n1. Create SSH keys.\n\n Before initiating the server provisioning process, you must have the SSH keys.\n The public SSH keys that you provide are used as the authorized keys to log\n in to your Bare Metal Solution server.\n\n You must create the Cloud KMS key in the same project that contains\n your Bare Metal Solution server.\n\n If you choose to use SSH keys, you need at least one public SSH key. The\n public key must have an `ssh-rsa` type signature: \n\n ssh-rsa \u003cvar translate=\"no\"\u003epublic_key\u003c/var\u003e \u003cvar translate=\"no\"\u003eoptional comment\u003c/var\u003e\n\n To learn how to create SSH keys, see\n [Create SSH keys](/bare-metal/docs/troubleshooting/configure-serial-console#generate-ssh-key).\n\n To learn how to manage your SSH keys, see [Manage SSH keys](/bare-metal/docs/troubleshooting/configure-serial-console#manage-ssh-keys).\n2. In the project that contains your Bare Metal Solution server, register your\n SSH keys. Follow the steps in [Register the SSH keys](/bare-metal/docs/troubleshooting/configure-serial-console#register-ssh-key).\n\nSet up SSH keys while provisioning a server\n-------------------------------------------\n\nYou can set up SSH keys for a new Bare Metal Solution server while provisioning it through the [Google Cloud console intake form](/bare-metal/docs/bms-deploy#use_the_console_intake_form_to_enter_your_selections).\n\nYou can only select the SSH keys that exist in the same project as that of your server.\n\nTo set up SSH keys while provisioning a server, see [Use the Google Cloud console intake form to enter your selections](/bare-metal/docs/bms-deploy#use_the_console_intake_form_to_enter_your_selections).\n\nSet up SSH keys while reimaging a server\n----------------------------------------\n\nTo set up SSH keys while reimaging a server, see [Change the OS for a server](/bare-metal/docs/bms-maintenance#change-os-for-server).\n\nView SSH keys of a server\n-------------------------\n\nTo view SSH keys of a server, follow these steps: \n\n### Console\n\n1. Go to the **Servers** page.\n\n [Go to Servers](https://console.cloud.google.com/compute/bareMetalSolution/servers)\n2. Click the server name.\n\n On the **Server details** page, view the SSH keys in **SSH keys** field.\n\n### gcloud\n\nUse the `gcloud alpha bms instances auth-info` command: \n\n```\ngcloud alpha bms instances auth-info SERVER_NAME --project=PROJECT_ID --region=REGION\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSERVER_NAME\u003c/var\u003e: The name of the Bare Metal Solution server.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of the project.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: The location of the Bare Metal Solution server.\n\nAccess a server using the SSH keys\n----------------------------------\n\nSSH keys are associated with the `customeradmin` user. Therefore, while logging\nin through SSH, use `customeradmin` as the username.\n\nTo learn how to log in to your Bare Metal Solution server, see\n[Logging in to a Bare Metal Solution server for the first time](/bare-metal/docs/bms-setup#bms-first-logon).\n\nWhat's next\n-----------\n\n- [Operate your Bare Metal Solution server](/bare-metal/docs/bms-maintenance#operate_a_server).\n- [Check the status of a server](/bare-metal/docs/bms-maintenance#check_the_status_of_a_server).\n- [Manage servers](/bare-metal/docs/bms-maintenance#manage_servers)."]]