Skip to content

Commit

Permalink
2.0.3: fix the support for OCI_INSTANCE FQDNs in port-forwarding tunnels
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Korobskiy committed May 21, 2023
1 parent c91a893 commit 01b0714
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ Configure and ssh or create a tunnel to an Oracle Cloud Infrastructure host via
4. Install [`jq`](https://stedolan.github.io/jq/).
5. Install [`PCRE`](https://www.pcre.org/).
6. Define the following environment variables. OCI menus below are as of October 2022.
1. `OCI_INSTANCE`: OCI host Internal FQDN or Private IP. See `Compute` > `Instances` > {host} > `Primary VNIC`.
2. `OCI_INSTANCE_OCID`. See `Compute` > `Instances` > {host} > `General information` > `OCID`
3. `OCI_BASTION_OCID`. See `Identity & Security` > `Bastion` > {bastion} > `Bastion information` > `OCID`
1. `OCI_INSTANCE_OCID`. See `Compute` > `Instances` > {host} > `General information` > `OCID`
2. `OCI_BASTION_OCID`. See `Identity & Security` > `Bastion` > {bastion} > `Bastion information` > `OCID`
3. For `host_user` SSH sessions only: `OCI_INSTANCE`: OCI host Internal FQDN or Private IP. See `Compute` >
`Instances` > {host} > `Primary VNIC`.
* If you're working with the single OCI host, setting them globally in your environment will work well.
* If you're working with multiple hosts, you can pass these vars on-the-fly: see the `Usage Examples` section.

### Usage Examples ###

* Create a bastion session and ssh as `taras` server user using the system environment vars: `ssh-oci-bastion.sh taras`
* Create a bastion session and ssh:
`OCI_INSTANCE=10.xx OCI_INSTANCE_OCID=ocid1.instance.xx OCI_BASTION_OCID=ocid1.bastion.xx ssh-oci-bastion.sh taras`
* Create a bastion port-forwarding session and launch the tunnel for the port 1234: `ssh-oci-bastion.sh -p 1234`
`OCI_INSTANCE_OCID=ocid1.instance.xx OCI_BASTION_OCID=ocid1.bastion.xx OCI_INSTANCE=10.xx ssh-oci-bastion.sh taras`
* Create a bastion port-forwarding session and launch the tunnel for the port 1234:
`OCI_INSTANCE_OCID=ocid1.instance.xx OCI_BASTION_OCID=ocid1.bastion.xx ssh-oci-bastion.sh -p 1234`
* Create a bastion session and ssh using the `ADMIN` OCI client profile: `ssh-oci-bastion.sh -o ADMIN taras`

0 comments on commit 01b0714

Please sign in to comment.