Creating a Port Forwarding Session in Bastion
Create a port forwarding session.
You must have the following information about the target resource you intend to create a session for:
- Valid credentials to sign in to the target resource, such as operating system and database
- One of the following:
- The name and compartment of the target compute instance
- The IP address and port of the target resource
Ensure that you have the public key file of the SSH key pair that you plan to use to connect to the session. To learn more, see Managing Key Pairs on Linux Instances.
Use the oci bastion session create-port-forwarding command and required parameters to create a port forwarding session:
oci bastion session create-port-forwarding --bastion-id <bastion_ocid> [OPTIONS]
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Run the CreateSession operation to create a port forwarding session.