-
Open the navigation menu and click Identity & Security. Click Bastion.
-
Under List scope, select the compartment where the bastion was created.
-
Click the name of the bastion, and then under Sessions, create a new Dynamic Port Forwarding (SOCKS5) session to the subnet in which your database is provisioned.
-
In the Actions menu for the session, click View SSH command.
-
To copy the command, next to SSH command, click Copy, and then click Close.
-
Use a text editor to replace <localPort> with the local port on the machine from which you want to connect to the bastion, replace <sessionId> with the bastion session ID, and replace <bastionHost> with the domain name where the bastion is hosted.
- (Optional)
Add the verbose (
-v
) option to the SSH command for detailed information about the connection.
Note
Don't use the -vv
or -vvv
options.
-
Use a command line to issue the customized SSH command and connect to the bastion session.
If your private key was created with a passphrase, you are prompted to enter it twice for a Dynamic Port Forwarding (SOCKS5) session.
After creating a connection to a Dynamic Port Forwarding (SOCKS5) session, the process will not exit. Do not close the terminal.
If you enabled verbose output (-v
), the final message after a successful connection is:
debug1: pledge: network
-
Open a database client such as Oracle SQL*Plus or Oracle SQL Developer, and then connect to
localhost
(or 127.0.0.1
) and the local port you specified, <localPort>
.
Provide the name and password of an existing user on the database.
For example:
$ export CUSTOM_JDBC="-Doracle.net.socksProxyHost=127.0.0.1
-Doracle.net.socksProxyPort=1080 -Doracle.net.socksRemoteDNS=true"
$ sql -cloudconfig <wallet_path>.zip
<ADB_admin_username>/"<ADB_admin_password>
"@<tns_alias_low>
If you run into any problems, see Troubleshooting Bastion.