Repository navigation
LAB 24 ‐ OCI Cloud Shell
Learn how to use OCI Cloud Shell to run Linux commands and manage OCI resources directly from the browser.
OCI Cloud Shell is a browser-based terminal provided by Oracle Cloud Infrastructure.
It allows users to:
- Run Linux commands
- Use OCI CLI commands
- Access cloud resources
- Manage OCI services without installing software locally
Now by default as you can see you are connected with public network where you can run your linux commands.
Now click on Create private network definition.
Step 3: Now select the compartment(where you have created the VCN/Subnet) and give the name of the private network definition, select use as active network and then click on create.
As you can see now private network definition is created. click on close.
Now click on three dots and click on Use as active network.
again click on Use as active network and then click on close.
As you can see, now we are connected with our private network that is Sandbox-PND-01
Now, first we create a directory and inside that directory we create a file then we download this file from OCI cloud shell to our local laptop.
There is no need to specify the Absolute Path (starting from /home). You only need to provide the path relative to your current directory, such as ParentFolder/FileName. ex. my-dir/sample.txt
A Public Network allows resources to communicate with the internet using public IP addresses.
- Accessing websites or APIs from the internet
- SSH access to instances
- Hosting public applications
Most commonly used for:
- Web servers
- Bastion servers
- Internet-facing applications
An OCI Service Network provides private access to Oracle Cloud services without using the public internet.
- Accessing Object Storage privately
- Connecting OCI services securely
- Avoiding internet traffic
Used when:
- Security is important
- Traffic should stay inside OCI network
A Private Network Definition List is a saved configuration file that defines private networking settings and rules.
- Reusing network configurations
- Automating network setup
- Exporting/importing network settings
Mostly used in:
- Automation
- Infrastructure as Code
- Cloud Shell networking configurations
An Ephemeral Private Network is a temporary private network created for short-term communication and automatically removed after use.
- Temporary testing
- Short-lived sessions
- Secure temporary connectivity
Used for:
- Temporary workloads
- Testing environments
- Session-based networking
| Network Type | Internet Access | Private Communication | Temporary/Permanent | Common Use |
|---|---|---|---|---|
| Public Network | Yes | No | Permanent | Public apps, SSH |
| OCI Service Network | No | Yes | Permanent | OCI services access |
| Private Network Definition List | No | Yes | Permanent Config | Reusable configurations |
| Ephemeral Private Network Setup | No | Yes | Temporary | Testing, short-term access |
| Network Type | Usage Frequency |
|---|---|
| Public Network | Most Common |
| OCI Service Network | Very Common |
| Private Network Definition List | Used in automation |
| Ephemeral Private Network Setup | Less Common |
Both OCI Cloud Shell and PuTTY are used to run Linux commands, but OCI Cloud Shell provides additional cloud management and automation capabilities directly from the OCI Console.
| OCI Cloud Shell | PuTTY |
|---|---|
| Browser-based terminal | Local SSH client |
| No installation required | Requires installation |
| OCI CLI pre-installed | OCI CLI must be installed manually |
| Directly connected with OCI Console | Manual SSH connection required |
| Accessible from anywhere | Depends on local system |
| Secure Oracle-managed environment | Depends on local machine configuration |
Cloud engineers use OCI Cloud Shell to:
- Manage compute instances
- Create and manage buckets
- Check networking resources
- Run OCI CLI commands
- Troubleshoot cloud resources
without manually connecting to servers.
OCI Cloud Shell already contains OCI CLI.
Example:
oci --versionNo need to:
- Install OCI CLI manually
- Configure credentials locally
Professionals use Cloud Shell for:
- Checking VCN configuration
- Verifying instance status
- Testing network connectivity
- Running scripts
- Managing cloud resources
Example:
oci compute instance listIn PuTTY:
- SSH keys must be created
- Keys must be configured manually
In OCI Cloud Shell:
- Login to OCI Console
- Open Cloud Shell
- Start working immediately
Cloud Shell is commonly used for:
- Bash scripting
- OCI automation
- Terraform commands
- Kubernetes management
- DevOps operations
OCI Cloud Shell provides:
- Oracle-managed secure environment
- Temporary cloud session
- No dependency on local machine setup
This improves operational security in enterprise environments.
A production server becomes unavailable.
The cloud engineer:
- Opens OCI Console
- Launches OCI Cloud Shell
- Runs troubleshooting commands
Example:
oci compute instance listThe engineer can quickly:
- Verify instance status
- Check networking
- Validate attached volumes
- Troubleshoot issues
without configuring PuTTY or SSH manually.
| Tool | Main Purpose |
|---|---|
| PuTTY | Connect to Linux server using SSH |
| OCI Cloud Shell | Full cloud management terminal inside OCI Console |
- No software installation required
- OCI CLI already available
- Browser-based access
- Fast troubleshooting
- Useful for automation
- Secure cloud-managed environment
- Ideal for DevOps and cloud administration
- OCI administration
- Cloud automation
- Troubleshooting OCI resources
- Running OCI CLI commands
- DevOps operations
- Terraform and Kubernetes management
- Managing cloud infrastructure directly from OCI Console
It saves time because everything is preconfigured inside the OCI Console.
- Connecting to Linux servers using SSH
- Remote server administration
- Managing on-premises servers
- Accessing virtual machines manually
- Running Linux commands on remote systems
- Troubleshooting server-level issues
- Secure remote terminal access
"I use OCI Cloud Shell for Cloud Administration because it provides a secure, managed environment with pre-installed DevOps tools like Terraform and the OCI CLI. However, for Instance Management and software installation inside a VM, I prefer using PuTTY/SSH for direct access to the Operating System."