Skip to content
Sarawut Srichana - IT Portfolio
Go back

Génération d’une paire de clés SSH RSA pour une migration incrémentale Azure

Table of contents

Open Table of contents

Résumé pour la direction (French)

Scenario

Dans le cadre d’une migration incrémentale vers Microsoft Azure, l’équipe Nautilus DevOps devait mettre en place un mécanisme d’accès sécurisé pour accompagner les opérations de transition. L’objectif principal était de réduire les risques liés à l’authentification, d’aligner le déploiement sur les bonnes pratiques de sécurité, et de préparer les futurs accès administrateurs aux ressources cloud.

La demande portait sur la génération d’une paire de clés SSH dédiée dans Azure, avec les caractéristiques suivantes :

Cette étape était nécessaire pour garantir un accès distant sécurisé aux ressources qui utiliseront une authentification par clé publique, tout en respectant la contrainte de sécurité selon laquelle la clé privée doit rester exclusivement côté client.

Resolution

La paire de clés SSH RSA a été générée avec succès via le portail Azure, puis validée sans erreur. La clé privée au format .pem a été téléchargée et conservée localement, conformément au modèle de sécurité Azure, qui ne stocke pas la clé privée.

Le résultat apporte plusieurs bénéfices immédiats :

Success

La création de la paire de clés SSH a été validée avec succès et répond aux exigences de sécurité de la migration incrémentale Azure.

Technical Implementation (English)

Topology

The implementation was intentionally lightweight and focused on secure identity material generation for future VM or service access within Azure.

The deployed configuration included:

From an architectural perspective, the Azure SSH public key resource is stored in the target resource group and can later be referenced by virtual machines or automation workflows. The private key is generated once and downloaded by the operator during creation, which ensures that Azure does not retain sensitive private-key material.

Azure Configuration

Info

Azure stores the public SSH key as a managed resource, but the private .pem key must be secured on the client side immediately after download.

Action

The SSH key pair was created successfully through the Azure Portal using the required migration parameters:

  1. Open the Azure Portal.
  2. Navigate to the SSH key creation workflow.
  3. Select the target Resource Group: kml_rg_main-ff98e182a44e4cc2
  4. Set the Location to East US
  5. Enter the Key Pair Name: datacenter-kp
  6. Choose RSA as the key type
  7. Create the resource and download the generated private key file (.pem)
  8. Confirm that the resource was provisioned successfully in Azure

Validation confirmed that the SSH key resource was available in the resource group and that the private key download was completed during provisioning.

Warning

If the private key is not downloaded and stored securely at creation time, it cannot be retrieved later from Azure.

For repeatable deployments, the same configuration can be provisioned through Infrastructure as Code or command-line automation.

az sshkey create \
  --name "datacenter-kp" \
  --resource-group "kml_rg_main-ff98e182a44e4cc2" \
  --location "eastus"create-ssh-key.sh
New-AzSshKey `
  -ResourceGroupName "kml_rg_main-ff98e182a44e4cc2" `
  -Name "datacenter-kp" `
  -Location "EastUS"create-ssh-key.ps1
Note

Using Azure CLI or Azure PowerShell helps standardize key provisioning across migration waves and reduces manual configuration drift.


Share this post:

Previous Post
Provisionnement d’une machine virtuelle Linux sur Azure pour une migration DevOps progressive
Next Post
Provisionnement d’une machine virtuelle Azure Linux en ligne de commande