QuestionQ245

Networking

Which of the following commands connects to the remote host example.com, where OpenSSH listens on TCP port 2222?

Choose two
  • A ssh --port 2222 example.com
  • B ssh -p 2222 example.com
  • C ssh -o Port=2222 example.com
  • D ssh -o GatewayPort=2222 example.com
  • E ssh example.com:2222
Explanation

OpenSSH’s -p option specifies the port to connect to on the remote host. Its -o option accepts client configuration-file options, including Port; therefore, setting Port=2222 also selects TCP port 2222 for the connection.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!