How to Test a Reverse SSH Tunnel Connection
Use case
You want to test the connection of the reverse SSH tunnel that you are using to connect Fivetran with your database connector or destination.
Fivetran Recommendation
There are several tests that you can run to ensure that the reverse SSH tunnel is working as expected. Run the following tests from the virtual machine (VM) running your SSH server:
Test a generic SSH connection between your VM and Fivetran's.
ssh fivetran@<FIVETRAN_SUPPLIED_IP>
If this doesn't work, check firewalls on both sides and confirm safelisting is configured correctly by having each machine attempt to ping each other. ICMP protocol must be open on each machine/network.
ping <DATABASE_IP>
Confirm that your VM is able to access your database.
telnet <DATABASE_IP> <DATABASE_PORT>
Test one-time port routing.
ssh <FIVETRAN_SSH_USERNAME>@<FIVETRAN_SUPPLIED_IP> -R <SSH_HIGH_PORT>:<DATABASE_IP>:<DATABASE_PORT>
Resources
If you are new to working with reverse SSH tunnels, this diagram visualizes how they are implemented in Fivetran:
You can also read this third party blog explaining how reverse SSH tunnels work.