SSH Tunnel
Intro
If your database is in the private subnet, you can establish a secure channel between your database and IOMETE using an SSH Tunnel.
You can also choose this connection method for an added layer of security too.

Create SSH Tunnel in IOMETE
In IOMETE, there are two ways to set up an SSH tunnel connection.
- CloudFormation Automation
- Automated SSH Server setup using AWS CloudFormation service.
- Manual Configuration
- Set up the SSH Server manually with a step-by-step guide.
Go to the Settings > SSH Tunnel and click the Create New button

Create Automatically
1. Select CloudFormation Automation card and click Next button

2. Under the Tunnel name, give the tunnel a name.
This name will be used as the hostname for the connections.
3. Under AWS Credentials give AWS access and secret keys
After the SSH setup is completed, we will delete your credentials. For security reasons, you can create temporary AWS credentials with expiration time. We need access to EC2 Instance, RDS Instance View, Run CloudFormation, etc.
4. Click the Retrieve RDS Instances button

5. Under Select RDS Instance, choose the database instance to get its public subnets.

6. From the public subnets, choose the subnet where you want the SSH Server should be deployed.

7. Click Confirm button. This will deploy a Cloudformation Script into your AWS account.

8. After Confirming, we should see this message. Click Go details button to going details page of creating tunnel
The setup process will be completed in a few minutes

We can see SSH Tunnel details view.

Create Manually
1. Select Manual Configuration card and click Next button

2. Under the Tunnel name, give the tunnel a name.
This name will be used as the hostname for the connections.
3. Under Host and Port give parameters of destination service.

Open the AWS EC2 console and create new EC2 Instance in the same VPC as your RDS database.
4. Add IOMETE Public Key.

5. Under SSH Server Details give ****username , EC2 instance Public DNS and Port details.
Username and Port parameters already filled with default values.

6. Click Create button

After clicking Create button we should see

Statuses
Connected
Connection established successfully.
Pending
SSH Tunnel being deployed and connection establishment is in progress. Normally takes less than a minute. If took more than 2-3 minutes check logs or contact support
Setup in progress
Cloudformation script is running, usually takes 2-3 minutes maximum
Failed
Connection failed. Please check logs for more details.