From the course: Essential Terraform in AWS

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Creating an SSH key pair

Creating an SSH key pair

- [Instructor] Next on the list is to create an SSH key pair. So we're going to do that in the terminal here. And we'll go full screen on the terminal. Clear it out. And so we're building an SSH key pair here locally, so we don't have to build it on Amazon at the AWS console. And Terraform will copy over the public key that we create to the instance. Now, I'm in Linux, and so what I'm going to be using is openssh, and that is very common in the field, but you might have a different SSH tool. Whatever you have, you're going to want to make a SSH key pair here to view whether we have that, or we can do an ssh -V and that will show if openssh is installed. If you don't have it, you could do a sudo apt install openssh-server, but chances are you do have it on your system. So we're just going to go ahead with the commands. To create an SSH key pair, we're going to do an ssh-keygen. And by default this would create an RSA key pair if we pressed enter right now. But, usually in the field, I…

Contents