Home » Ubuntu Linux » Ubuntu Amazon EC2 instance login with new created user and without pem file

Ubuntu Amazon EC2 instance login with new created user and without pem file

The default amazon EC2 instance does not allow user to log in without pem file.
sometime this is not convenient for working people with limited linux knowledge.
Here is how you can set up log in with password and get rid of the default ubuntu image user

Working on ami number: ami-0cdf4965

create ppk file from pem file using filezilla ftp client.
using SFTP option in settings, import the pem file and it will generate the ppk file for you
loginto EC2 instance using putty, make sure you using the new ppk file you created
change sshd configuration, allow user to login with password

sudo vi /etc/ssh/sshd_config
#change password authenticate field to yes
#PasswordAuthentication yes

restart ssh service

sudo /etc/init.d/ssh restart

add new admin account

sudo adduser newaccount
sudo adduser newaccount admin

delete default ubuntu user

This is not recommended on a real production server, since it is less secure, please user by caution.

sudo userdel ubuntu

Leave a Reply

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

*
*

*