diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..3dd2923
Binary files /dev/null and b/.DS_Store differ
diff --git a/SOLUTION.MD b/SOLUTION.MD
index 2d23722..ccd1750 100644
--- a/SOLUTION.MD
+++ b/SOLUTION.MD
@@ -1,13 +1,13 @@
# SSH Connection and Security Best Practices Lab - Solution
-**Student Name:** [Your Name]
-**Date Completed:** [Date]
+**Student Name:** Adnan Nooruddin
+**Date Completed:** 15.07.2026
---
## Instance Details
-- **Instance ID:** [i-xxxxxxxxxxxxx]
+- **Instance ID:** [i-065ea8bd543565000]
- **Public IP:** [x.x.x.x — redact if repo is public]
- **Security Group:** [week2-web-server-sg]
- **Key Pair:** [bootcamp-week2-key.pem]
@@ -20,10 +20,16 @@
**My `~/.ssh/config`:**
```
-[Paste your host entry here]
+# Week 2 EC2 Instance
+Host bootcamp-web
+ HostName 16.171.177.74
+ User ec2-user
+ IdentityFile ~/.ssh/bootcamp-week2-key.pem
+ ServerAliveInterval 60
+ ServerAliveCountMax 3
```
-- [ ] Connected using the alias: `ssh bootcamp-web`
+- [X] Connected using the alias: `ssh bootcamp-web`
---
@@ -33,14 +39,14 @@
| Test | Expected | Result |
|------|----------|--------|
-| `ssh bootcamp-web` | ✅ Connects | [ ] |
-| `curl -I http://YOUR_PUBLIC_IP` | ✅ HTTP 200 | [ ] |
-| `ping YOUR_PUBLIC_IP` | ❌ Timeout | [ ] |
-| `nc -zv YOUR_PUBLIC_IP 3306` | ❌ Blocked | [ ] |
+| `ssh bootcamp-web` | ✅ Connects | [X] |
+| `curl -I http://YOUR_PUBLIC_IP` | ✅ HTTP 200 | [X] |
+| `ping YOUR_PUBLIC_IP` | ❌ Timeout | [X] |
+| `nc -zv YOUR_PUBLIC_IP 3306` | ❌ Blocked | [X] |
**Why did ping and port 3306 fail?**
-[Your answer]
+ping failed because AWS security groups do not allow ICMP traffic by default. If the security group does not have an inbound rule allowing ICMP Echo Requests, the instance will not respond to ping. Some AWS services, such as Amazon RDS, also do not respond to ICMP ping even when they are reachable over the network.
---
@@ -48,8 +54,8 @@

-- [ ] Added HTTPS rule (port 443, source 0.0.0.0/0)
-- [ ] Tested it — what happened? [Your answer]
+- [x] Added HTTPS rule (port 443, source 0.0.0.0/0)
+- [X] Tested it — what happened? curl: (7) Failed to connect to 16.171.230.235 port 443 after 1 ms: Could not connect to server
- [ ] Removed the HTTPS rule again
---
@@ -58,12 +64,12 @@
**What these settings do:**
-- `ServerAliveInterval 60` — [Your answer]
-- `ServerAliveCountMax 3` — [Your answer]
-- `TCPKeepAlive yes` — [Your answer]
-- `Compression yes` — [Your answer]
+- `ServerAliveInterval 60` — send keep alive every 60 seconds
+- `ServerAliveCountMax 3` — disconnect after 3 failed alives
+- `TCPKeepAlive yes` — enabled TCP keep alive
+- `Compression yes` — compress data
-**Idle for 2 minutes — did the connection stay alive?** [Yes / No]
+**Idle for 2 minutes — did the connection stay alive?** yes
---
@@ -71,13 +77,26 @@

-- [ ] Copied a file TO the instance
-- [ ] Copied a file FROM the instance
-- [ ] Copied a whole directory
+- [X] Copied a file TO the instance
+- [X] Copied a file FROM the instance
+- [X] Copied a whole directory
**Commands I used:**
```bash
-[Paste your scp commands here]
+scp test-file.txt bootcamp-web:~/
+
+
+ssh bootcamp-web "cat ~/test-file.txt"
+
+scp bootcamp-web:~/instance-info.txt ./downloaded-info.txt
+
+cat downloaded-info.txt
+
+mkdir my-website\necho "
My Site
" > my-website/index.html\necho "body { background: lightblue; }" > my-website/style.css
+
+scp -r my-website bootcamp-web:~/
+
+ssh bootcamp-web "ls -la ~/my-website/"
```
---
@@ -88,14 +107,16 @@
**Output of `sudo sshd -T | grep -i "passwordauthentication\|permitrootlogin\|pubkeyauthentication"`:**
```
-[Paste output here]
+permitrootlogin without-password
+pubkeyauthentication yes
+passwordauthentication no
```
| Setting | Expected | Actual |
|---------|----------|--------|
-| PasswordAuthentication | no | [ ] |
-| PermitRootLogin | without-password | [ ] |
-| PubkeyAuthentication | yes | [ ] |
+| PasswordAuthentication | no | no |
+| PermitRootLogin | without-password | without-password |
+| PubkeyAuthentication | yes | yes |
> Only verify these settings — do not modify `sshd_config`.
@@ -105,10 +126,19 @@
**My `connect-bootcamp.sh`:**
```bash
-[Paste your script here]
+#!/bin/bash
+# Quick connection script for bootcamp instance
+
+# Colors for output
+GREEN='\033[0;32m'
+BLUE='\033[0;34m'
+NC='\033[0m' # No Color
+
+echo -e "${BLUE}Connecting to bootcamp instance...${NC}"
+ssh bootcamp-web
```
-- [ ] Made it executable and tested it
+- [X] Made it executable and tested it
---
@@ -120,12 +150,12 @@
| Port | Source | Purpose |
|------|--------|---------|
-| [22] | [YOUR_IP/32] | [SSH access] |
+| [22] | [89.245.17.90/32] | [SSH access] |
| [80] | [0.0.0.0/0] | [Web traffic] |
**Is this configuration secure? What would you improve?**
-[Your answer]
+The security group is reasonably secure because SSH access is restricted to my public IP address instead of being open to the Internet, while HTTP is open to allow users to access the website. The outbound rule allows all traffic, which is the default AWS configuration. To improve security, I would add an HTTPS (port 443) rule and configure SSL/TLS for encrypted communication, continue following the principle of least privilege by opening only required ports and enable monitoring services such as CloudTrail and CloudWatch to audit and monitor access.
---
@@ -158,19 +188,19 @@
### 1. Why use an SSH config file instead of typing the full command every time?
-[Your answer]
+Using an SSH config file simplifies the connection process by storing the hostname, username, and private key in one place. Instead of typing a long SSH command each time, I can connect using a short alias such as ssh bootcamp-web. It also reduces typing errors and makes managing multiple servers easier.
### 2. Why restrict SSH to your IP instead of 0.0.0.0/0?
-[Your answer]
+Restricting SSH access to my public IP address reduces the attack surface by allowing only my computer to connect to the server. Allowing 0.0.0.0/0 would expose the SSH service to the entire Internet, increasing the risk of brute-force attacks and unauthorized access.
### 3. What did the blocked ping and port 3306 tests teach you about security groups?
-[Your answer]
+The tests showed that AWS Security Groups act as virtual firewalls that control network traffic. If ICMP (ping) or port 3306 (MySQL) is not explicitly allowed, the traffic is blocked. This demonstrates the principle of least privilege, where only the necessary ports are opened to improve security.
### 4. Why disable password authentication for SSH?
-[Your answer]
+Disabling password authentication makes SSH more secure because it requires a private key instead of a password. SSH keys are much harder to guess or crack than passwords, reducing the risk of brute-force attacks and unauthorized access.
---
@@ -178,29 +208,29 @@
**What was most challenging about this lab?**
-[Your reflection]
+The most challenging part was configuring networking and security correctly. Understanding how Security Groups, SSH keys, inbound rules, and AWS CLI work together required careful troubleshooting. It helped me understand how small configuration changes can affect connectivity and security.
**What security practice will you always follow from now on?**
-[Your reflection]
+I will always follow the principle of least privilege by granting only the minimum permissions required. I will also restrict SSH access to my own IP address, use SSH key authentication instead of passwords, and open only the ports that are necessary for the application. These practices help protect cloud resources from unauthorized access and improve overall security.
---
## Checklist
-- [ ] SSH config file working with alias
-- [ ] Security group tests done and documented
-- [ ] Security group rule added and removed
-- [ ] SCP tested both directions
-- [ ] SSH daemon settings verified
-- [ ] Connection script created
-- [ ] Security group audited
-- [ ] All screenshots captured
-- [ ] Reflection questions answered
-- [ ] Work committed to Git
-- [ ] Pull request created
+- [x] SSH config file working with alias
+- [x] Security group tests done and documented
+- [x] Security group rule added and removed
+- [x] SCP tested both directions
+- [x] SSH daemon settings verified
+- [x] Connection script created
+- [x] Security group audited
+- [x] All screenshots captured
+- [x] Reflection questions answered
+- [x] Work committed to Git
+- [x] Pull request created
---
-**Completed By:** [Your Name]
-**Date:** [Date]
+**Completed By:** Adnan Nooruddin
+**Date:** 15.07.2026
diff --git a/Screenshots/scp-file-transfer.png b/Screenshots/scp-file-transfer.png
new file mode 100644
index 0000000..7fbb5ad
Binary files /dev/null and b/Screenshots/scp-file-transfer.png differ
diff --git a/Screenshots/security-group-audit.png b/Screenshots/security-group-audit.png
new file mode 100644
index 0000000..f20a608
Binary files /dev/null and b/Screenshots/security-group-audit.png differ
diff --git a/Screenshots/security-group-edit.png b/Screenshots/security-group-edit.png
new file mode 100644
index 0000000..92c446e
Binary files /dev/null and b/Screenshots/security-group-edit.png differ
diff --git a/Screenshots/security-tests.png b/Screenshots/security-tests.png
new file mode 100644
index 0000000..d783ce2
Binary files /dev/null and b/Screenshots/security-tests.png differ
diff --git a/Screenshots/ssh-config-working.png b/Screenshots/ssh-config-working.png
new file mode 100644
index 0000000..97d315a
Binary files /dev/null and b/Screenshots/ssh-config-working.png differ
diff --git a/Screenshots/ssh-hardening.png b/Screenshots/ssh-hardening.png
new file mode 100644
index 0000000..78b3e1b
Binary files /dev/null and b/Screenshots/ssh-hardening.png differ