How to Login to a AWS-EC2 Instance as a user and then switch to root

By | February 13, 2014

Steps required to login to Linux Servers in Amazon EC2 as a root user.

By default root is not allowed to login to Amazon EC2, but you can login as ec2-user as indicated in the steps below. Once you login with ec2-user you can switch to root.

Step 1 – Download putty from –
and execute putty.

Step 2 – In the Session tab , input “ec2-user@ec2-ip address of the remote cloud” ( This information can be found from the Console Management of AWS Instance)

Step 3 – Under Connection -> SSH -> Auth – Browse and choose the ppk certificate. Amazon or as a matter of fact almost all the cloud providers generally allow you download the .pem certificate which you need to convert to ppk certificate using puttygen.exe.

Step 4 – Now you will be logged in automatically.

Step 5- Enter the command sudo su which will enable the root mode (without a password).

Leave a Reply

Your email address will not be published. Required fields are marked *