Login  Register

Oracle Base Database Service - Bastion - OCI

Posted by satish on Mar 28, 2024; 1:11am
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/Oracle-Base-Database-Service-Bastion-OCI-tp12383.html

Hi erman,

We are using oracle base database service. We have created dev database system. We are trying to connect to database host to connect as sysdba and run some installation apex scripts.

We want to access it through bastion using cloud shell.

We have created bastion in the same subnet as database host. We have also created bastion session to connect to database host.


From Bastion session: we have copied ->ssh -i <privateKey> -N -L *******:22 -p 22 ocid1.bastionsession.oc1.ap-hyderabad-1.****"@host.bastion.ap-hyderabad-1.oci.oraclecloud.com

replaced <privateKey> and modified statement is

ssh -i ssh-key-2024-03-00.key -N -L 22:*****:22 -p 22 ocid1.bastionsession.oc1.ap-hyderabad-1.***""""@host.bastion.ap-hyderabad-1.oci.oraclecloud.com

From Cloud shell:

We copy pasted the above command,which throwed below error.

Xyz@cloudshell:~ (ap-hyderabad-1)$ cd .ssh
Xyz@cloudshell:.ssh (ap-hyderabad-1)$ ssh -i ssh-key-2024-03-00.key -N -L 22:*****:22 -p 22 ocid1.bastionsession.oc1.ap-hyderabad-1.***""""@host.bastion.ap-hyderabad-1.oci.oraclecloud.com

Privileged ports can only be forwarded by root.
Xyz@cloudshell:.ssh (ap-hyderabad-1)$

Any idea what's going wrong here. Pls guide.

Thank you,
Sg