Study guide

11.2 OCI Bastion: Managed SSH, Port Forwarding & SOCKS5 Sessions

OCI 2026 Architect Professional 1Z0-997-26

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & Architecture Foundations

1.1 Exam Logistics, the 2026 Blueprint & How to Use This Guide 1.2 The OCI Well-Architected Framework & Architectural Tradeoffs

2 Chapter 2: High Availability & Resilient Design

2.1 Availability Domains, Fault Domains, Instance Pools & Load Balancers 2.2 OCI DNS Traffic Steering, Geolocation & Health Checks 2.3 Block Volume Replication, Volume Groups & Backup Policies 2.4 Object Storage Replication, Versioning & Retention Rules (WORM)

3 Chapter 3: Full Stack Disaster Recovery

3.1 Full Stack Disaster Recovery: Protection Groups, Members & Permissions 3.2 DR Plans: Switchover, Failover, Prechecks & Plan Execution 3.3 DR Drills, Plan Customization & Operational Readiness

4 Chapter 4: Container Instances, OCIR & OCI DevOps

4.1 Containerization, Microservices & OCI Container Instances 4.2 OCI Container Registry: Repositories, Push & Pull, and Image Management 4.3 OCI DevOps: Code Repositories, Build Pipelines & Deployment Strategies

5 Chapter 5: OCI Kubernetes Engine (OKE)

5.1 OKE Cluster Types, Node Options & Cluster Creation 5.2 OKE Networking: VCN-Native Pod Networking vs. Flannel, Subnet Sizing & Load Balancers 5.3 OKE Workload Identity, Secrets & Persistent Storage

6 Chapter 6: Serverless Functions & API Gateway

6.1 OCI Functions: Concepts, Invocation Modes, Integrations & Image Security 6.2 API Gateway: Authentication, JWT Validation, Rate Limiting & Usage Plans

7 Chapter 7: Messaging & Event-Driven Design

7.1 OCI Streaming, OCI Queue & Messaging Patterns for Microservices 7.2 OCI Events, Event Rules & OCI Notifications Fan-Out

8 Chapter 8: Infrastructure as Code with Terraform & Resource Manager

8.1 Infrastructure as Code with Terraform and the OCI Provider 8.2 OCI Resource Manager: Stacks, Jobs, Drift Detection & Private Endpoints

9 Chapter 9: Identity & Multi-Tenancy Governance

9.1 IAM Policy Design: Verbs, Conditions, Dynamic Groups & Principals 9.2 Organizations Management, Governance Rules & Compartment Quotas

10 Chapter 10: Security Posture with Cloud Guard & Security Zones

10.1 Cloud Guard: Detector Recipes, Problems, Scores & Responders 10.2 Security Zones & Vulnerability Scanning

11 Chapter 11: Secure Access & Network Protection

11.1 Layered Network Security: Security Lists, NSGs & Private Access to Services 11.2 OCI Bastion: Managed SSH, Port Forwarding & SOCKS5 Sessions 11.3 Zero Trust Packet Routing (ZPR): Security Attributes & Intent-Based Policy 11.4 OCI Network Firewall: Policies, Inspection Routing, Tunnel Inspection & Private NAT

12 Chapter 12: Application & Data Protection: WAF, Certificates & Vault

12.1 OCI Web Application Firewall: Policies, Modules, Actions & Enforcement Points 12.2 OCI Certificates: Private CAs, TLS Certificates, Renewal & Integrations 12.3 OCI Vault Key Management: Vault Types, Protection Modes, Dedicated KMS & External KMS 12.4 Vault Secrets: Versions, Rotation States, Automatic Generation & Rotation

13 Chapter 13: Base Database Service & Autonomous AI Database

13.1 Base Database Service: DB Systems, RAC, Data Guard, Cloning & Maintenance 13.2 Autonomous AI Database: Workload Types, Deployment Options, Services & Connectivity 13.3 Operating Autonomous AI Database: Scaling, Cloning, Backups, Patching & Self-Tuning 13.4 Autonomous Data Guard & Backup-Based Disaster Recovery for Autonomous AI Database

14 Chapter 14: Recovery Service, Global Distribution & OCI Cache

14.1 Autonomous Recovery Service: Protection Policies, Real-Time Protection & Retention Lock 14.2 Globally Distributed Autonomous AI Database: Sharding, Data Placement & Replication 14.3 OCI Cache: Valkey and Redis Clusters, Sharding, Security & Cross-Region Replication

15 Chapter 15: Monitoring, Alarms & Notifications

15.1 OCI Monitoring: Metrics, Namespaces, Custom Metrics & Monitoring Query Language 15.2 Alarms & Notifications: Trigger Rules, Absence Alarms, Split Messages, Suppression & Delivery

16 Chapter 16: Logging, Audit, Connector Hub & Search

16.1 OCI Logging: Log Groups, Service Logs, Custom Logs & the Unified Monitoring Agent 16.2 Logging Search, the Logging Query Language & OCI Audit 16.3 Connector Hub: Moving Logs, Metrics, Queue Messages & Streams Between Services 16.4 OCI Search with OpenSearch & Resource Search for Observability

11.2 OCI Bastion: Managed SSH, Port Forwarding & SOCKS5 Sessions

Key Takeaways Explain This Topic AI

OCI Bastion provides restricted, time-limited SSH-based access to target resources that don't have public endpoints, and bastions do not incur costs.

A managed SSH session requires a Linux platform image, a running OpenSSH server, and the Oracle Cloud Agent with the Bastion plugin enabled.

SSH port forwarding sessions need neither an OpenSSH server nor the Oracle Cloud Agent on the target, so they work for databases and Windows RDP.

A dynamic port forwarding (SOCKS5) session tunnels to a target subnet, and the client chooses which host and port to reach.

A bastion's maximum session time-to-live can be set from 30 minutes to 180 minutes (3 hours).

Last updated: October 2026

Why Bastion Replaces Jump Hosts

A traditional jump host is a VM with a public IP that administrators SSH into before reaching private servers. It exposes port 22 to the internet, needs patching and user management, and runs all the time. OCI Bastion is an Oracle-managed service that provides restricted and time-limited access to target resources without public endpoints. Bastions do not incur costs , although they have service limits.

You cannot SSH directly into a bastion or administer it like a host. Instead, you create sessions through it.

Bastions and Sessions

Concept Description

Bastion A resource attached to a target VCN and subnet . It defines the client CIDR block allowlist (the IP ranges that may connect) and the maximum session time-to-live (TTL) .

Session A time-limited connection to one target. You provide the public key of an SSH key pair when you create it, and connect with the matching private key .

Client CIDR allowlist Connections are accepted only from these addresses, for example a corporate VPN egress range.

To use a session, a user needs IAM permission, the private key that matches the public key in the session, and a client IP inside the allowlist.

  • The Three Session Types
  • 1. Managed SSH Session

A managed SSH session gives SSH access to a compute instance . The instance must:

Run a Linux platform image (Windows is not supported).

Run an OpenSSH server .

Run the Oracle Cloud Agent with the Bastion plugin enabled .

The agent is enabled by default on instances created from many Oracle-provided images, but the Bastion plugin is not enabled by default , so you must turn it on before creating a session. Bastion relies on the plugin to set up access on the instance for the life of the session.

2. SSH Port Forwarding Session

An SSH port forwarding session (SSH tunneling) connects a port on your client machine to a specific port on a target IP address or DNS name . It does not need an OpenSSH server or the Oracle Cloud Agent on the target, so it works for:

Databases : for example, connecting Oracle SQL Developer to the private endpoint of an Autonomous AI Transaction Processing database.

Windows servers : tunneling RDP on port 3389.

Web consoles or any other TCP service on a private IP.

A typical connection command looks like this: ssh -i <private-key> -N -L <local-port>:<target-private-ip>:<target-port> -p 22 <session-ocid>@host.bastion.<region>.oci.oraclecloud.com

3. Dynamic Port Forwarding (SOCKS5) Session

A dynamic port forwarding session gives the same benefits as SSH port forwarding, but instead of one fixed target it creates a tunnel to a target subnet . Your client (for example, a browser configured to use a SOCKS5 proxy) then decides which resource and port to reach. This suits administrators who need to reach several private web consoles during one maintenance window.

  • Session type Target Needs OpenSSH on target Needs Oracle Cloud Agent + Bastion plugin Typical use
  • Managed SSH One Linux instance Yes Yes Shell access to Linux VMs
  • SSH port forwarding One IP or DNS name and port No No Databases, RDP, single web consoles
  • Dynamic port forwarding (SOCKS5) A subnet No No Several private services through one tunnel
  • Time-to-Live Limits

Sessions are temporary by design. The bastion's maximum session TTL can be set from a minimum of 30 minutes to a maximum of 180 minutes (3 hours) , and each session can have its own TTL up to that maximum. When the TTL expires, the session ends and the user must create a new session. You can also delete a session before it expires. Setting the bastion-level TTL to the shortest practical value limits how long a stolen private key could be useful.

Network Design

Create the bastion with the target subnet where the resources are, or a subnet with routes to them.

Add security rules or NSG rules on the targets that allow SSH (port 22) or the forwarded ports from the bastion's private IP in the target subnet.

Keep the client CIDR allowlist as narrow as possible. Avoid 0.0.0.0/0 .

Access Control and Monitoring

IAM policies control who can create bastions and sessions. Separate the people who manage bastions from the people who only create sessions, and scope permissions to compartments.

OCI Audit records every call to the Bastion API, such as session creation, including the requesting principal.

Monitoring provides Bastion metrics, and Events let you react when bastions or sessions change state.

Cloud Guard activity detectors include rules for "Bastion created" and "Bastion session created", which can alert the security team.

Oracle also recommends integrating target instances with IAM and multifactor authentication and auditing Bastion operations as part of securing the service.

Loading diagram... Bastion Session Types