Stay organized with collections
Save and categorize content based on your preferences.
Create an SSH key pair
To enable encrypted communications with your cluster, you must create an
asymmetric key pair (a public and a private key) and associate it with your
control plane or node pool virtual machines.
To generate an asymmetric key pair, run the following command:
[[["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-08-25 UTC."],[],[],null,["# Create an SSH key pair\n======================\n\nTo enable encrypted communications with your cluster, you must create an\nasymmetric key pair (a public and a private key) and associate it with your\ncontrol plane or node pool virtual machines.\n\nTo generate an asymmetric key pair, run the following command: \n\n ssh-keygen -t rsa -m PEM -b 4096 -C \"\u003cvar translate=\"no\"\u003eCOMMENT\u003c/var\u003e\" \\\n -f \u003cvar translate=\"no\"\u003eSSH_PRIVATE_KEY\u003c/var\u003e -N \"\" 1\u003e/dev/null\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSSH_PRIVATE_KEY\u003c/var\u003e: a file name to save the key in\n- \u003cvar translate=\"no\"\u003eCOMMENT\u003c/var\u003e: a text string describing the key\n\nThis creates two files: \u003cvar translate=\"no\"\u003eSSH_PRIVATE_KEY\u003c/var\u003e containing your\nSSH private key, and \u003cvar translate=\"no\"\u003eSSH_PRIVATE_KEY\u003c/var\u003e`.pub` containing the\ncorresponding public key.\n\nTo save your SSH public key into an environment variable, run the following\ncommand: \n\n SSH_PUBLIC_KEY=$(cat \u003cvar translate=\"no\"\u003eSSH_PRIVATE_KEY\u003c/var\u003e.pub)\n\nWhat's next\n-----------\n\n- [Quickstart](/kubernetes-engine/multi-cloud/docs/azure/quickstart)\n- [Create a cluster](/kubernetes-engine/multi-cloud/docs/azure/how-to/create-cluster)"]]