How to create aws ec2 private-public key pairBest way to use multiple SSH private keys on one clientHow to specify the private SSH-key to use when executing shell command on Git?Change key pair for ec2 instanceExtract public/private key from PKCS12 file for later use in SSH-PK-AuthenticationCalculate RSA key fingerprintcreating a private key for AWS EC2 InstancePermission denied (publickey) when SSH Access to Amazon EC2 instancecreate an ec2 instance with multiple key pairsAllowing users to SSH into EC2 Linux Instance with key pairsProtecting private key generated for AWS EC2
Break down the phrase "shitsurei shinakereba naranaindesu"
Coupling two 15 Amp circuit breaker for 20 Amp
ELI5 what is SMTChecker?
Is "prohibition against," a double negative?
A vector is defined to have a magnitude and *a* direction, but the zero vector has no *single* direction. So, how is the zero vector a vector?
Is this statement about a motion being simple harmonic in nature strong?
How were US credit cards verified in-store in the 1980's?
What is the motivation behind designing a control stick that does not move?
How do I get my neighbour to stop disturbing with loud music?
Create a list of snaking numbers under 50,000
What checks exist against overuse of presidential pardons in the USA?
Heavy Box Stacking
Am I required to correct my opponent's assumptions about my morph creatures?
German equivalent to "going down the rabbit hole"
How to save money by shopping at a variety of grocery stores?
Calculate Landau's function
'spazieren' - walking in a silly and affected manner?
Ask one verbal question to figure out who is blind and who is mute among three persons
Resources to learn about firearms?
Why doesn't Starship have four landing legs?
How is the anglicism "jackpot" commonly expressed in French?
Do universities maintain secret textbooks?
How is the casino term "a high roller" commonly expressed in German?
Why do IR remotes influence AM radios?
How to create aws ec2 private-public key pair
Best way to use multiple SSH private keys on one clientHow to specify the private SSH-key to use when executing shell command on Git?Change key pair for ec2 instanceExtract public/private key from PKCS12 file for later use in SSH-PK-AuthenticationCalculate RSA key fingerprintcreating a private key for AWS EC2 InstancePermission denied (publickey) when SSH Access to Amazon EC2 instancecreate an ec2 instance with multiple key pairsAllowing users to SSH into EC2 Linux Instance with key pairsProtecting private key generated for AWS EC2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm following this guide of creating aws environment. Now after I created my environment I want to ssh to the ec2.
What I need is to create private-public key pair, which I don't know how.
at the beginning of the guide, it tells:
Generate public key from private key
ssh-keygen -y -f ~/.ssh/pemfile/mumbai.pem
But how I create a mumbai.pem file on my host?
Is there a command to download create this pem, or I need to download it from aws?
I'm really new with aws, I hope this is not too obvious.
amazon-web-services ssh key-pair
add a comment |
I'm following this guide of creating aws environment. Now after I created my environment I want to ssh to the ec2.
What I need is to create private-public key pair, which I don't know how.
at the beginning of the guide, it tells:
Generate public key from private key
ssh-keygen -y -f ~/.ssh/pemfile/mumbai.pem
But how I create a mumbai.pem file on my host?
Is there a command to download create this pem, or I need to download it from aws?
I'm really new with aws, I hope this is not too obvious.
amazon-web-services ssh key-pair
If you are using Windows, use Putty and Pageant. Linux, that command will probably work.
– user9105725
Mar 27 at 23:32
But, when you create the ec2 instance, it gives you the key though. Make sure port 22 is open through VPC for SSH. 3389 for RDP. So, you don’t need to make a key. It will give you one, you just need to remember to save it.
– user9105725
Mar 27 at 23:35
add a comment |
I'm following this guide of creating aws environment. Now after I created my environment I want to ssh to the ec2.
What I need is to create private-public key pair, which I don't know how.
at the beginning of the guide, it tells:
Generate public key from private key
ssh-keygen -y -f ~/.ssh/pemfile/mumbai.pem
But how I create a mumbai.pem file on my host?
Is there a command to download create this pem, or I need to download it from aws?
I'm really new with aws, I hope this is not too obvious.
amazon-web-services ssh key-pair
I'm following this guide of creating aws environment. Now after I created my environment I want to ssh to the ec2.
What I need is to create private-public key pair, which I don't know how.
at the beginning of the guide, it tells:
Generate public key from private key
ssh-keygen -y -f ~/.ssh/pemfile/mumbai.pem
But how I create a mumbai.pem file on my host?
Is there a command to download create this pem, or I need to download it from aws?
I'm really new with aws, I hope this is not too obvious.
amazon-web-services ssh key-pair
amazon-web-services ssh key-pair
asked Mar 27 at 23:30
YagelYagel
3691 gold badge3 silver badges12 bronze badges
3691 gold badge3 silver badges12 bronze badges
If you are using Windows, use Putty and Pageant. Linux, that command will probably work.
– user9105725
Mar 27 at 23:32
But, when you create the ec2 instance, it gives you the key though. Make sure port 22 is open through VPC for SSH. 3389 for RDP. So, you don’t need to make a key. It will give you one, you just need to remember to save it.
– user9105725
Mar 27 at 23:35
add a comment |
If you are using Windows, use Putty and Pageant. Linux, that command will probably work.
– user9105725
Mar 27 at 23:32
But, when you create the ec2 instance, it gives you the key though. Make sure port 22 is open through VPC for SSH. 3389 for RDP. So, you don’t need to make a key. It will give you one, you just need to remember to save it.
– user9105725
Mar 27 at 23:35
If you are using Windows, use Putty and Pageant. Linux, that command will probably work.
– user9105725
Mar 27 at 23:32
If you are using Windows, use Putty and Pageant. Linux, that command will probably work.
– user9105725
Mar 27 at 23:32
But, when you create the ec2 instance, it gives you the key though. Make sure port 22 is open through VPC for SSH. 3389 for RDP. So, you don’t need to make a key. It will give you one, you just need to remember to save it.
– user9105725
Mar 27 at 23:35
But, when you create the ec2 instance, it gives you the key though. Make sure port 22 is open through VPC for SSH. 3389 for RDP. So, you don’t need to make a key. It will give you one, you just need to remember to save it.
– user9105725
Mar 27 at 23:35
add a comment |
2 Answers
2
active
oldest
votes
Just run ssh-keygen
and it should prompt you for details on where to create the key. Just note: If you run this command on your local machine, it will generate both the public key and the private key. In this case, you will need to Import Your Own Public Key to Amazon EC2. This method works better for terraform as you can put the text value output of your public key into the aws_key_pair
resource easily.
If you create the key via the ec2 console, AWS will keep the public key in the system automatically and your browser will download the private key. See Creating a Key Pair Using Amazon EC2. (this second approach will save you having to upload it to ec2 keypairs). This method also works with the aws_key_pair
resource, however you'll have to import the existing resource into terraform. It's simpler to use the first approach.
If you're doing it all via terraform, check out aws_key_pair
add a comment |
First of all, it may be too much if you're new to AWS
The tutorial you're using equiped servers with Terraform, which is a 3rd party tool out of AWS
You may consider a much more intuitive turtorial to create your first instance from AWS console, and AWS will help to generate a key-pair, and you will have the full control
In the other hand, this article is an advaced one, it's trying to automate all infra work including instance creation, network and etc. It's useful but may be too complicated to follow
So back to your question, TF will inject the public key generated based on mumbai.pem, into the new server created in this code snippet:
# Define SSH key pair for our instances
resource "aws_key_pair" "default"
key_name = "mumbai"
public_key = "$file("$var.key_path")"
It's not too obivious as the author is so familiar with TF and he skips the basic part
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388047%2fhow-to-create-aws-ec2-private-public-key-pair%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just run ssh-keygen
and it should prompt you for details on where to create the key. Just note: If you run this command on your local machine, it will generate both the public key and the private key. In this case, you will need to Import Your Own Public Key to Amazon EC2. This method works better for terraform as you can put the text value output of your public key into the aws_key_pair
resource easily.
If you create the key via the ec2 console, AWS will keep the public key in the system automatically and your browser will download the private key. See Creating a Key Pair Using Amazon EC2. (this second approach will save you having to upload it to ec2 keypairs). This method also works with the aws_key_pair
resource, however you'll have to import the existing resource into terraform. It's simpler to use the first approach.
If you're doing it all via terraform, check out aws_key_pair
add a comment |
Just run ssh-keygen
and it should prompt you for details on where to create the key. Just note: If you run this command on your local machine, it will generate both the public key and the private key. In this case, you will need to Import Your Own Public Key to Amazon EC2. This method works better for terraform as you can put the text value output of your public key into the aws_key_pair
resource easily.
If you create the key via the ec2 console, AWS will keep the public key in the system automatically and your browser will download the private key. See Creating a Key Pair Using Amazon EC2. (this second approach will save you having to upload it to ec2 keypairs). This method also works with the aws_key_pair
resource, however you'll have to import the existing resource into terraform. It's simpler to use the first approach.
If you're doing it all via terraform, check out aws_key_pair
add a comment |
Just run ssh-keygen
and it should prompt you for details on where to create the key. Just note: If you run this command on your local machine, it will generate both the public key and the private key. In this case, you will need to Import Your Own Public Key to Amazon EC2. This method works better for terraform as you can put the text value output of your public key into the aws_key_pair
resource easily.
If you create the key via the ec2 console, AWS will keep the public key in the system automatically and your browser will download the private key. See Creating a Key Pair Using Amazon EC2. (this second approach will save you having to upload it to ec2 keypairs). This method also works with the aws_key_pair
resource, however you'll have to import the existing resource into terraform. It's simpler to use the first approach.
If you're doing it all via terraform, check out aws_key_pair
Just run ssh-keygen
and it should prompt you for details on where to create the key. Just note: If you run this command on your local machine, it will generate both the public key and the private key. In this case, you will need to Import Your Own Public Key to Amazon EC2. This method works better for terraform as you can put the text value output of your public key into the aws_key_pair
resource easily.
If you create the key via the ec2 console, AWS will keep the public key in the system automatically and your browser will download the private key. See Creating a Key Pair Using Amazon EC2. (this second approach will save you having to upload it to ec2 keypairs). This method also works with the aws_key_pair
resource, however you'll have to import the existing resource into terraform. It's simpler to use the first approach.
If you're doing it all via terraform, check out aws_key_pair
edited Mar 28 at 5:28
answered Mar 28 at 5:19
MoeMoe
1,0583 silver badges14 bronze badges
1,0583 silver badges14 bronze badges
add a comment |
add a comment |
First of all, it may be too much if you're new to AWS
The tutorial you're using equiped servers with Terraform, which is a 3rd party tool out of AWS
You may consider a much more intuitive turtorial to create your first instance from AWS console, and AWS will help to generate a key-pair, and you will have the full control
In the other hand, this article is an advaced one, it's trying to automate all infra work including instance creation, network and etc. It's useful but may be too complicated to follow
So back to your question, TF will inject the public key generated based on mumbai.pem, into the new server created in this code snippet:
# Define SSH key pair for our instances
resource "aws_key_pair" "default"
key_name = "mumbai"
public_key = "$file("$var.key_path")"
It's not too obivious as the author is so familiar with TF and he skips the basic part
add a comment |
First of all, it may be too much if you're new to AWS
The tutorial you're using equiped servers with Terraform, which is a 3rd party tool out of AWS
You may consider a much more intuitive turtorial to create your first instance from AWS console, and AWS will help to generate a key-pair, and you will have the full control
In the other hand, this article is an advaced one, it's trying to automate all infra work including instance creation, network and etc. It's useful but may be too complicated to follow
So back to your question, TF will inject the public key generated based on mumbai.pem, into the new server created in this code snippet:
# Define SSH key pair for our instances
resource "aws_key_pair" "default"
key_name = "mumbai"
public_key = "$file("$var.key_path")"
It's not too obivious as the author is so familiar with TF and he skips the basic part
add a comment |
First of all, it may be too much if you're new to AWS
The tutorial you're using equiped servers with Terraform, which is a 3rd party tool out of AWS
You may consider a much more intuitive turtorial to create your first instance from AWS console, and AWS will help to generate a key-pair, and you will have the full control
In the other hand, this article is an advaced one, it's trying to automate all infra work including instance creation, network and etc. It's useful but may be too complicated to follow
So back to your question, TF will inject the public key generated based on mumbai.pem, into the new server created in this code snippet:
# Define SSH key pair for our instances
resource "aws_key_pair" "default"
key_name = "mumbai"
public_key = "$file("$var.key_path")"
It's not too obivious as the author is so familiar with TF and he skips the basic part
First of all, it may be too much if you're new to AWS
The tutorial you're using equiped servers with Terraform, which is a 3rd party tool out of AWS
You may consider a much more intuitive turtorial to create your first instance from AWS console, and AWS will help to generate a key-pair, and you will have the full control
In the other hand, this article is an advaced one, it's trying to automate all infra work including instance creation, network and etc. It's useful but may be too complicated to follow
So back to your question, TF will inject the public key generated based on mumbai.pem, into the new server created in this code snippet:
# Define SSH key pair for our instances
resource "aws_key_pair" "default"
key_name = "mumbai"
public_key = "$file("$var.key_path")"
It's not too obivious as the author is so familiar with TF and he skips the basic part
answered Mar 28 at 3:35
Calvin ZhouCalvin Zhou
1491 silver badge5 bronze badges
1491 silver badge5 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388047%2fhow-to-create-aws-ec2-private-public-key-pair%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If you are using Windows, use Putty and Pageant. Linux, that command will probably work.
– user9105725
Mar 27 at 23:32
But, when you create the ec2 instance, it gives you the key though. Make sure port 22 is open through VPC for SSH. 3389 for RDP. So, you don’t need to make a key. It will give you one, you just need to remember to save it.
– user9105725
Mar 27 at 23:35