venket's b log

venket's b log

Install Amazon Linux 2 on on-premises

Install Amazon Linux 2 on on-premises

·Jul 10, 2021·

1 min read

Play this article

Amazon Linux 2 is amazon's own Linux distribution. Its available on amazon cloud services(AWS) as vm. here we are going to install Amazon Linux on our on-premises.

First we decide which virtualization platform we are going to use for this installation.

here you can go to download the vm image for all the virtualation platforms.

  1. VMWare
  2. KVM
  3. Oracle VirtualBox
  4. Microsoft Hyper-V

Here we are going to download the amazon Linux 2 image.


open vmware application and open and point out downloaded amazon linux 2 ovf images.


and import


now start the vm

in the os kernal selection mode press the e button to edit the kernal

and add this line

   rw  init = /sysroot/bin/sh



now your os enter in to single user mode


then give the below commands

:/# chroot /

:/# passwd root

:/# touch /.autorelabel

:/# exit

Now the password reset part is done.

now you can able to login your amazon linux onpermises server


to enable password authentication through ssh edit the below file

sudo vi /etc/ssh/sshd_config

add this line

    password authenticaton yes

if you want allow root login through ssh add the below line

    permit root login yes
Share this