Are there servers firewalled (or in a DMZ) which cannot be SSH'd directly? These servers are usually public facing such as OHS and can only be connected via a jumpbox. Below are examples of configuring SSH tunnels.
Note that the SSH configuration below is for the adminserver
because Myst connects to hosts via the AdminServer.
Check your SSH version by running as certain commands have compatibility requirements.
ssh -V
Obviously we need all SSH connections to not have a prompt otherwise you'd be entering a password for each SSH jump.
These steps assume you don't have an SSH key. If you already have a key then skip steps 1 and 2.
adminserver
as the oracle
userssh-keygen -t rsa -b 4096
Enter
keyssh-copy-id oracle@adminserver
oracle
userssh-copy-id
not existing then try:
cat ~/.ssh/id_rsa.pub | ssh oracle@jumpbox "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
oracle
userssh-copy-id oracle@jumpbox
oracle
userssh-copy-id
not existing then try:
cat ~/.ssh/id_rsa.pub | ssh oracle@dmzhost1 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
Update or create the oracle
user's $HOME/.ssh/config
with one of these methods.
Host dmzhost1
ProxyJump adminserver,jumpbox
Use this method if running a version lower than OpenSSH 7.3
.
Host dmzhost1
ProxyCommand ssh adminserver -A ssh jumpbox -W %h:%p
Use this method if the single
method does not work.
Host dmzhost1
ProxyCommand ssh jumpbox -W %h:%p
Host jumpbox
ProxyCommand ssh adminserver -W %h:%p
Test the SSH command.
adminserver
and the oracle
user ssh dmzhost1