Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Configurar chaves SSH para um servidor
É possível configurar chaves SSH para o servidor da Solução Bare Metal.
A configuração de chaves SSH é opcional. É possível definir essas opções ao provisionar um novo servidor ou ao recriar a imagem de um servidor existente.
Antes de iniciar o processo de provisionamento do servidor, você precisa ter as chaves SSH.
As chaves SSH públicas fornecidas são usadas como chaves autorizadas para fazer login no servidor da Solução Bare Metal.
Você precisa criar a chave do Cloud KMS no mesmo projeto que contém
o servidor da Solução Bare Metal.
Se você optar por usar chaves SSH, precisará de pelo menos uma chave pública SSH. A chave pública precisa ter uma assinatura de tipo ssh-rsa:
No projeto que contém o servidor da Solução Bare Metal, registre as chaves
SSH. Siga as etapas em Registrar as chaves SSH.
Configurar chaves SSH ao provisionar um servidor
É possível configurar chaves SSH para um novo servidor da Solução Bare Metal ao provisioná-lo usando o formulário de recebimento do console.Google Cloud
Só é possível selecionar as chaves SSH que estão no mesmo projeto do seu servidor.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-01 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)."]]