Bird
0
0

You want to connect to a remote server at example.com as user admin but the server uses a non-standard port 2222. Which command will connect correctly?

hard📝 Application Q15 of 15
Linux CLI - SSH and Remote Access
You want to connect to a remote server at example.com as user admin but the server uses a non-standard port 2222. Which command will connect correctly?
Assh -p 2222 admin@example.com
Bssh admin@example.com:2222
Cssh admin@example.com -port 2222
Dssh admin@2222.example.com
Step-by-Step Solution
Solution:
  1. Step 1: Recall how to specify a port in ssh

    The correct flag to specify a port is -p followed by the port number.
  2. Step 2: Analyze each option

    ssh -p 2222 admin@example.com uses -p 2222 correctly. Options A, C, and D use incorrect syntax or wrong placement.
  3. Final Answer:

    ssh -p 2222 admin@example.com -> Option A
  4. Quick Check:

    Use -p to specify port in ssh [OK]
Quick Trick: Use ssh -p port user@host for custom ports [OK]
Common Mistakes:
  • Putting port after hostname with colon
  • Using -port instead of -p
  • Changing hostname to include port number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes