Which of the following commands connects to the remote host example.com which has OpenSSH listening on TCP port 2222? (Choose TWO correct answers.)
Which of the following commands connects to the remote host example.com which has OpenSSH listening on TCP port 2222? (Choose TWO correct answers.)
To connect to the remote host example.com using OpenSSH on TCP port 2222, you can use either ssh -p 2222 example.com or ssh -o Port=2222 example.com. The -p option is a direct way to specify the port, while the -o option allows setting various SSH options, including the port, in a key=value format.
To connect to a remote host on a specific TCP port using OpenSSH, you need to specify the correct option to change the default port (which is 22). From the given options, the correct ones are: B. ssh -p 2222 example.com: This is the standard way to specify a different port for the SSH connection. The -p option is used to specify the port number. C. ssh -o Port=2222 example.com: This uses the -o option to specify SSH options in a key=value format. Port=2222 sets the port number for the connection.