Bird
0
0

If you run ssh -p 2222 user@host, what does the -p 2222 option do?

medium📝 Command Output Q5 of 15
Linux CLI - SSH and Remote Access
If you run ssh -p 2222 user@host, what does the -p 2222 option do?
APauses the SSH session after connecting
BPrints the SSH version 2.2
CSpecifies the port number 2222 for the SSH connection
DPrevents password authentication
Step-by-Step Solution
Solution:
  1. Step 1: Understand the -p option in SSH

    -p specifies the port number to connect to on the remote host.
  2. Step 2: Identify the port number used

    Here, 2222 is the custom port instead of default 22.
  3. Final Answer:

    Specifies the port number 2222 for the SSH connection -> Option C
  4. Quick Check:

    -p option = A [OK]
Quick Trick: Use -p to set SSH port number [OK]
Common Mistakes:
  • Thinking -p prints version
  • Assuming it pauses session
  • Believing it disables password login

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes