Creating a Managed SSH Session in Bastion
Create a managed SSH session.
Before creating a managed SSH session, verify the following information:
- The bastion plugin is enabled on the target Compute instance . For details, see Managing Plugins with Oracle Cloud Agent.
- The VCN (virtual cloud network) includes a gateway (service gateway , internet gateway , or NAT gateway ) and a route rule for the gateway.
For details, see Service Gateway, Internet Gateway, or NAT Gateway.
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-managed-ssh command and required parameters to create a managed SSH session:
oci bastion session create-managed-ssh --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 managed SSH session.