Set up a bastion host in Azure #
Configuring an SSH tunnel for Azure Cloud enables you
to connect to your Azure data sources using Starburst Galaxy. This page
provides step-by-step instructions for configuring an SSH tunnel for Azure
Cloud. After completing these steps, you can use Galaxy to generate
catalogs and execute queries using your Azure databases.
Prerequisites #
Before you begin, you must complete the following:
To configure a bastion host, you must allow access from both your local network
and from your Starburst Galaxy network.
Connect your local network #
- In the Azure portal, use the search bar to
navigate to the Virtual machines page. Select the VM that you intend to
use as your bastion host.
- In the left navigation menu, click Network settings. In the + Create
port rule drop-down menu, select Inbound port rule.
- In the Add inbound security rule pane, select IP Addresses from the
Source drop-down menu.
- In the Source IP addresses/CIDR ranges field, enter the public IP address
for your local network.
- In the Service drop-down menu, select SSH.
- In the Name field, enter a name for your inbound security rule.
- Click Add to finish creating the rule.
Connect your Starburst Galaxy network #
- In the + Create port rule drop-down menu, select Inbound port rule
again.
- In the Add inbound security rule pane, select IP Addresses from the
Source drop-down menu.
- In the Source IP addresses/CIDR ranges field, enter the public IP
address range for your Starburst Galaxy network.
- In the Service drop-down menu, select SSH.
- In the Name field, enter a name for your inbound security rule.
- Click Add to finish creating the rule.
Update SSH client configuration file #
- In the Overview page for your VM, copy the Public IP address.
- Open your SSH client configuration file using the following command:
- At the end of the file, paste the following content. Replace
<azbastion>
,
<public-ip>
, <azureuser>
, and <your-ssh-key-file>
with your connection
properties.
Host <azbastion>
Hostname <public-ip>
User <azureuser>
ForwardAgent yes
IdentityFile ~/.ssh/<your-ssh-key-file>.pem
IdentitiesOnly yes
- Save and close the file.
- Log in to Starburst Galaxy.
- Expand the Admin > Cloud Settings menu, and select the Azure tab.
- Click the Configure SSH tunnel button.
- Click the Generate RSA key button. Copy the RSA key to your clipboard.
- Run the following command to create a
galaxy.pub
file:
- Paste the RSA key into the file. Save the file.
- Use the following command to copy the
galaxy.pub
file to your bastion host.
Replace <azbastion>
with the bastion host alias defined in your SSH client
configuration file.
ssh-copy-id -f -i ~/.ssh/galaxy.pub <azbastion>
- Run the following command to access your bastion host using the SSH tunnel:
- Return to the Starburst Galaxy SSH tunnels pane.
- In the SSH tunnel alias field, enter a name for your SSH tunnel.
- In the SSH host and SSH user fields, paste the
<azbastion>
and
<azureuser>
values from your SSH client configuration file.
- Click the Validate and save button.
Is the information on this page helpful?