# 🚀 Day 5 of Learning DevOps + Cloud ☁️

### 📅 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"**
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1754929557235/6b446fd8-e9d1-45c1-a7f9-9c8af1526d12.png align="center")

**Reference:** [AWS EC2 Documentation](https://docs.aws.amazon.com/ec2/index.html)

---

### 🔑 Step 2: Connecting via SSH (Git Bash)

Command I used:

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

⚠️ Faced errors like:

* **Permission denied (publickey)** → Fixed by setting correct permissions:
    
    ```plaintext
    chmod 400 my-key.pem
    ```
    
* **Host key verification failed** → Solved by removing old known hosts entry:
    
    ```plaintext
    ssh-keygen -R <public-ip>
    ```
    

After ~15 minutes of trial and error… **Connected successfully! 🎉**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1754929578925/ccbcf841-71ed-4d18-98c8-f0f802a191a4.png align="center")

**Reference:** [Connect to EC2 via SSH](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html)

---

### 📂 Step 3: Practicing Linux Commands

Once inside EC2, I explored basic commands:

| Command | Description |
| --- | --- |
| `ls` | List files & directories |
| `pwd` | Show current directory |
| `mkdir bundle` | Create folder named `bundle` |
| `cd bundle/` | Move inside folder |
| `touch file.txt` | Create empty file |
| `cd ..` | Go back |
| `vi piyush.txt` | Create/edit text file |
| `cat piyush.txt` | View file content |
| `top` | Monitor system processes |
| `nproc` | Show CPU cores count |
| `df -h` | Show disk usage in human-readable format |
| `exit` | Leave SSH session |

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1754929600164/8847cf0b-402a-4142-97f7-e06ca04ae1b1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1754929660930/be1b9a3a-e9b7-41f1-8943-a8a975458d69.png align="center")

**Reference:** [Linux Commands Cheat Sheet](https://linuxcommand.org/lc3_learning_the_shell.php)

---

### 📌 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

* [AWS EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html)
    
* [Linux Essentials for Cloud Engineers](https://ubuntu.com/tutorials/command-line-for-beginners)
    

---

💡 **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**
