πŸš€ Day 5 of Learning DevOps + Cloud ☁️

Priyanshu BhattPriyanshu Bhatt
2 min read

πŸ“… Today's Journey

Today started with excitement β€” and a few hiccups.
The plan:

  1. Launch an EC2 Instance β†’ Named it "my-first-instance".

  2. Connect via Git Bash using SSH.

  3. Practice essential Linux commands inside AWS EC2.


πŸ–₯ Step 1: Launching EC2 Instance

Using AWS Management Console:

  • Selected Amazon Linux 2 AMI

  • Chose t2.micro instance (free-tier)

  • Created a new key pair for SSH access

  • Security group allowed port 22 (SSH)

  • Named the instance "my-first-instance"

Reference: AWS EC2 Documentation


πŸ”‘ Step 2: Connecting via SSH (Git Bash)

Command I used:

ssh -i my-key.pem ec2-user@<public-ip>

⚠️ Faced errors like:

  • Permission denied (publickey) β†’ Fixed by setting correct permissions:

      chmod 400 my-key.pem
    
  • Host key verification failed β†’ Solved by removing old known hosts entry:

      ssh-keygen -R <public-ip>
    

After ~15 minutes of trial and error… Connected successfully! πŸŽ‰

Reference: Connect to EC2 via SSH


πŸ“‚ Step 3: Practicing Linux Commands

Once inside EC2, I explored basic commands:

CommandDescription
lsList files & directories
pwdShow current directory
mkdir bundleCreate folder named bundle
cd bundle/Move inside folder
touch file.txtCreate empty file
cd ..Go back
vi piyush.txtCreate/edit text file
cat piyush.txtView file content
topMonitor system processes
nprocShow CPU cores count
df -hShow disk usage in human-readable format
exitLeave SSH session

Reference: Linux Commands Cheat Sheet


πŸ“Œ Key Learnings Today

  • SSH errors are common, but solvable with patience.

  • File permissions (chmod) are crucial for SSH security.

  • Knowing a few Linux commands already makes working inside EC2 easier.

  • Cloud computing is not just clicking buttons β€” the command line is powerful.


πŸ”— Additional Resources


πŸ’‘ Tip: Always keep your .pem file safe and never share it publicly β€” it’s your private key to access your instance.


#100DaysOfCloud #AWS #DevOps #Linux #LearningInPublic

0
Subscribe to my newsletter

Read articles from Priyanshu Bhatt directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Priyanshu Bhatt
Priyanshu Bhatt

πŸ‘‹ Hey there! I'm a final-year BCA student πŸ‘¨β€πŸ’» diving deep into MERN Stack πŸš€ | Python Django 🐍 | React βš›οΈ | Learning JavaScript + DSA πŸ’‘ Passionate about building, breaking & learning every single day βš”οΈπŸ’» Sharing my dev journey as a #CodeNewbie πŸ’¬