Bird
0
0

You run ssh user@host but get the error: ssh: Could not resolve hostname host: Name or service not known. What is the likely cause?

medium📝 Debug Q6 of 15
Linux CLI - SSH and Remote Access
You run ssh user@host but get the error: ssh: Could not resolve hostname host: Name or service not known. What is the likely cause?
AThe SSH service is not running on the remote server.
BThe hostname 'host' is not defined in DNS or /etc/hosts.
CThe user 'user' does not exist on the remote server.
DThe SSH client version is outdated.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze error message

    Error says hostname cannot be resolved, meaning DNS or hosts file lookup failed.
  2. Step 2: Identify cause

    Hostname 'host' is unknown to the system, so connection cannot start.
  3. Final Answer:

    The hostname 'host' is not defined in DNS or /etc/hosts. -> Option B
  4. Quick Check:

    Hostname resolution failure = The hostname 'host' is not defined in DNS or /etc/hosts. [OK]
Quick Trick: Check hostname spelling and DNS or hosts file [OK]
Common Mistakes:
  • Assuming SSH service or user issues cause this error
  • Ignoring hostname resolution step
  • Blaming SSH client version

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes