Download And Run Amazon Linux 2 AMI Locally On Your VirtualBox or Vmware

Kalkulator Cetak
2 min readMay 2, 2020

--

Amazon has already released their custom Amazon Linux for download which is based on RedHat, I would like to walk through anyone interested in using their linux based distros on their hypervisors either Virtualbox or Vmware including WorkStation, Players, Fusion.

Look at the screenshots below, At what I choose, You might decide to use any name your prefer which doesn’t matter.
Name: Amazon AMI Linux 2
Type: Linux
Version: Other Linux (64-bit)

Click On Next, At the Memory Size, Just Click On Next Don’t Worry

At the Hard Disk, Select use an existing virtual hard disk file, and select the location of your downloaded Amazon Linux 2 AMI you downloaded through the link above. And click Add and choose the downloaded file and create.

And Click on Start.

This is where things get tricky, As you might know for anyone who has launched an EC2 instance with Amazon AMI Linux2 on AWS, You have to login with SSH Private Keys because of Security, Amazon has already given a way to do that, But it’s a long process doing that, So let’s get started with the process.

By default Amazon Linux has these users,
> ec2-user
> root

Okay, Now use the following command to change the root and user password.

We’re done, You can now use the Amazon Linux 2 AMI on your machine, But there’s one more thing, you can’t SSH because PasswordAuthentication is disabled in the sshd_config by default.

nano /etc/ssh/sshd_config

Look for PasswordAuthentication and change from no to yes, which will look like this.

PasswordAuthentication yes

Then save, After that just.

service sshd restart

If there’s anything you can make use of the comments.

Originally published at https://medium.com on May 2, 2020.

--

--

No responses yet