⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 998+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
Junior / Associate DevOps [L1] Linux Linux / SRE — Scenario-Based Interview Questions Core Fundamentals [L1]

Q: A critical web server is unresponsive, butping still works. SSH connection is refused. What could be the issue and how would you resolve it?

If ping works but ssh is refused, the server is up (network layer is fine) but the SSH daemon (sshd) is either down, rejecting connection...

#Linux #Linux / SRE — Scenario-Based Interview Questions #L1 #SRE #Systems #Troubleshooting
🎙️ Candidate Opening & Architectural Context
""During an on-call shift, our alerts triggered when a critical Linux production server exhibited this behavior. The interviewer is testing: Basic system troubleshooting, understanding of SSH vs. ICMP.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Initial Diagnostics & Root Cause Analysis

If ping works but ssh is refused, the server is up (network layer is fine) but the SSH daemon (sshd) is either down, rejecting connections (e.g., max connections reached, TCP wrappers), or a local firewall is blocking port 22.

  • Is sshd running? systemctl status sshd
  • Check logs: journalctl -u sshd or /var/log/auth.log
  • Check firewall rules: iptables -L or ufw status
2️⃣

Remediation & Permanent Safeguards

To resolve: If physical or console access (like AWS Systems Manager or a hypervisor console) is available, I would log in and check: If it's an Out Of Memory (OOM) issue, sshd might have been killed by the OOM killer. I'd reboot the instance via the cloud provider console if no other access is possible to restore service, then investigate /var/log/messages after recovery.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Is sshd running? systemctl status sshd."
⚡ 60-Second Elevator Pitch Talking Points
  • Is sshd running? systemctl status sshd
  • Check logs: journalctl -u sshd or /var/log/auth.log
  • Check firewall rules: iptables -L or ufw status
Advertisement
Want more Linux scenarios?
Explore our complete collection of scenario-based Linux interview runbooks.
Browse All Linux Questions →

📚 Related Production Scenarios in Linux