Bird
0
0

You want to access a remote HTTP server on port 80 at web.remote.com, but your local port 80 is already in use. Which SSH command forwards remote port 80 to local port 8081 securely?

hard📝 Application Q8 of 15
Linux CLI - SSH and Remote Access
You want to access a remote HTTP server on port 80 at web.remote.com, but your local port 80 is already in use. Which SSH command forwards remote port 80 to local port 8081 securely?
Assh -L 8081:web.remote.com:80 user@web.remote.com
Bssh -R 8081:web.remote.com:80 user@web.remote.com
Cssh -L 80:web.remote.com:8081 user@web.remote.com
Dssh -R 80:web.remote.com:8081 user@web.remote.com
Step-by-Step Solution
Solution:
  1. Step 1: Identify the forwarding direction

    Forward remote port 80 to local port 8081 means local port forwarding (-L).
  2. Step 2: Construct the command

    Use ssh -L 8081:web.remote.com:80 user@web.remote.com to forward local port 8081 to remote port 80.
  3. Step 3: Verify other options

    Options with -R are remote forwarding, and swapping ports is incorrect.
  4. Final Answer:

    ssh -L 8081:web.remote.com:80 user@web.remote.com -> Option A
  5. Quick Check:

    Local port 8081 forwards to remote port 80 [OK]
Quick Trick: Use -L for local forwarding to unused local port [OK]
Common Mistakes:
  • Using -R instead of -L for local forwarding
  • Swapping local and remote ports
  • Trying to bind local port 80 when it's busy

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes