Skip to main content
SSH tunnel Key benefits of SSH tunnel:
  • Encryption: All data sent through the tunnel is encrypted.
  • Bypass firewalls: SSH tunnels can allow access to remote services behind firewalls that do not openly expose the required ports.
  • Access control: You can control exactly who can access your database by managing SSH tunnel users and keys.
  • Network isolation: SSH tunnels can help isolate your network traffic from the public internet.

How to set up an SSH tunnel

  1. Create a new EC2 instance (or equivalent).
  2. Record the public IP address and port.
  3. Go to Settings > SSH tunnels tab and click New SSH tunnel.
  4. Copy the public IP address and port from step 2 and click save.
  5. Copy the public key and add this to ~/.ssh/authorized_keys on your SSH tunnel
# (Optional) if you want to create a service account
sudo adduser -m artie
sudo su artie
mkdir ~/.ssh

# Add the public key to ~/.ssh/authorized_keys
vi ~/.ssh/authorized_keys

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys