Skip to content

Commit afcd24c

Browse files
committed
2.0.0
1 parent c5552db commit afcd24c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ Configure and ssh or create a tunnel to an Oracle Cloud Infrastructure host via
77

88
### Setup ###
99

10-
0. Bash shell, SSH CLI client, `sed`, `sleep`, etc.
10+
1. Bash shell, `perl`, `sleep`, etc.
1111
* (macOS, Linux) Out-of-the-box
1212
* (Windows) Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or [Cygwin](https://www.cygwin.com/)
13-
1. `ssh` CLI client.
13+
2. `ssh` CLI client.
1414
* Generate an SSH key pair if you don't have any. One of the following SSH public keys in \`~/.ssh/\` is required:
1515
\`id_rsa.pub\`, \`id_dsa.pub\`, \`id_ecdsa.pub\`, \`id_ed25519.pub\`, or \`id_xmss.pub\`. If there are multiple keys
1616
the first one found in this order will be used. The corresponding private key is usually also present there, but it
1717
can be moved to a credential vault and SSH agent, e.g. [1Password](https://developer.1password.com/docs/ssh).
18-
2. Install and configure [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm).
19-
3. Install [`jq`](https://stedolan.github.io/jq/).
20-
4. Define the following environment variables. OCI menus below are as of October 2022.
18+
3. Install and configure [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm).
19+
4. Install [`jq`](https://stedolan.github.io/jq/).
20+
5. Install [`PCRE`](https://www.pcre.org/).
21+
6. Define the following environment variables. OCI menus below are as of October 2022.
2122
1. `OCI_INSTANCE`: OCI host Internal FQDN or Private IP. See `Compute` > `Instances` > {host} > `Primary VNIC`.
2223
2. `OCI_INSTANCE_OCID`. See `Compute` > `Instances` > {host} > `General information` > `OCID`
2324
3. `OCI_BASTION_OCID`. See `Identity & Security` > `Bastion` > {bastion} > `Bastion information` > `OCID`
@@ -26,8 +27,9 @@ Configure and ssh or create a tunnel to an Oracle Cloud Infrastructure host via
2627

2728
### Usage Examples ###
2829

29-
* Create a bastion session and ssh using system environment vars: `ssh-oci-bastion.sh joe`
30+
* Create a bastion session and ssh as `taras` server user using the system environment vars: `ssh-oci-bastion.sh taras`
3031
* Create a bastion session and ssh:
31-
`OCI_INSTANCE=10.0.xx OCI_INSTANCE_OCID=ocid1.instance.xx OCI_BASTION_OCID=ocid1.bastion.xx ssh-oci-bastion.sh joe`
32-
* Create a bastion port-forwarding session and launch the tunnel for the port 1234: `ssh-oci-bastion.sh -p 1234`
32+
`OCI_INSTANCE=10.xx OCI_INSTANCE_OCID=ocid1.instance.xx OCI_BASTION_OCID=ocid1.bastion.xx ssh-oci-bastion.sh taras`
33+
* Create a bastion port-forwarding session and launch the tunnel for the port 1234: `ssh-oci-bastion.sh -p 1234`
34+
* Create a bastion session and ssh using the `ADMIN` OCI client profile: `ssh-oci-bastion.sh -o ADMIN taras`
3335

ssh-oci-bastion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ if [[ $port ]]; then
174174
fi
175175

176176
if [[ $HOST_USER ]]; then
177-
echo -e "\nCreating a bastion session: this can take up to 1m:20s to succeed..."
177+
echo -e "\nCreating a bastion session: this can take up to 1m:30s to succeed..."
178178
# `--session-ttl`: session duration in seconds (defaults to 30 minutes, maximum is 3 hours).
179179
# `--wait-interval-seconds`: state check interval (defaults to 30 seconds).
180180
# `--ssh-public-key-file` is required

0 commit comments

Comments
 (0)