Login to Ec2-Instance without .pem file for Unix OS.

ssh -i your_pem_file.pem ec2-user@ec2-________.compute-1.amazonaws.com
$ sudo useradd -s /bin/bash -m -d /home/USERNAME  -g root USERNAME
  • -s /bin/bash : use /bin/bash as the standard shell
  • -m -d /home/USERNAME : create a home directory at /home/USERNAME
  • -g root : add to the group root
  • USERNAME : the username of the new user
$ sudo passwd USERNAME
Enter new UNIX password:
Retype new UNIX password:
USERNAME  ALL=(ALL:ALL) ALL
systemctl restart sshd 
$ ssh USERNAME@ec2-________.compute-1.amazonaws.com
USERNAME@ec2-________.compute-1.amazonaws.com's password:

IT Analyst @ TCS

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

OpenGrok — Speed up Developer Productivity

Jira and Confluence Notification Overload: How to Deal With it?

Destructuring in Ruby

Finding Business Logic Vulnerabilities in Source code Review

Google Summer of Code with SCoRe Lab | Second Evaluation Summary

Firestore backend for Flutter. In-browser CodeLab. Part 2. Web App.

How I scored 93% in Certified Kubernetes Administrator (CKA) Exam

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
vikash sharma

vikash sharma

IT Analyst @ TCS

More from Medium

Backup & Archive with AWS

Remote backend for tfcdk

How to deploy a MySQL database using AWS RDS — a simple way!

List of EC2 Image Public SSM Parameters