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 2024/06/28 (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 2024/06/28 (UTC)."],[],[],null,["# Create an EC2 key pair\n\nYou can associate a specific SSH key pair with control plane or node pool\ninstances during creation.\n\nTo generate an asymmetric private key and import its public key into AWS, run\nthe following commands: \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\n aws ec2 import-key-pair --key-name \u003cvar translate=\"no\"\u003eSSH_KEY_PAIR_NAME\u003c/var\u003e \\\n --public-key-material fileb://\u003cvar translate=\"no\"\u003eSSH_PRIVATE_KEY\u003c/var\u003e.pub\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\"\u003eSSH_KEY_PAIR_NAME\u003c/var\u003e: a name you choose for the key pair\n- \u003cvar translate=\"no\"\u003eCOMMENT\u003c/var\u003e: a text string describing the key\n\nWhat's next\n-----------\n\n- [Quickstart](/kubernetes-engine/multi-cloud/docs/aws/quickstart)"]]