tunnel-databases
flaupretre/tunnel-databases/ssh
This module manages databases behind an SSH tunnel
The modules in this repository allow to create databases behind an SSH tunnel. The SSH tunnel is described here. Using this code as example, it should be very easy to adapt it to any DBMS flavor. Setup Requirements - A bastion host (gateway_host) with access to the database server (target_host). - Check access from bastion (gateway_host) to database (target_host:target_port). Enable Security Group or firewall. - A SSH certificate recorded at the ~/.ssh/authorized_keys of the remote user (gateway_user) at the bastion (gateway_host) via (gateway_port) to access without passphrase or password to remote host. Also a passhprase protected certificate recorded to local ssh-agent may be used. - The command timeout. MacOS users need to install it with brew install coreutils. Configuration examples