Use Oracle Cloud search to automate SSH connections
oci_ssh.py
depends on the oci-python-sdk, python 3.5+ and netcat
sudo apt update
sudo apt install netcat
sudo yum update
sudo yum install nc
brew install netcat
- Clone the repository within your
~/.ssh/
folder - Intall required packages
pip -r ~/.ssh/oci-ssh/requirements.txt
- Add
Include oci-ssh/config
in the ~/.ssh/config` file - Make sure that your OCI credentials are configured properly
oci+instance display name+region+profile(optional)
e.g.
ssh oci+myserver+us-ashburn-1
or ssh oci+myserver+us-ashburn-1+mytenancyprofile
If multiple instances have the same display name, the script will return IP address of the first one.