Closed SLeitgeb closed 3 weeks ago
I just confirmed that the same DB connection also works using the sshtunnel
library directly:
import paramiko
import sshtunnel
from time import sleep
REMOTE_SERVER_IP = "XY"
PRIVATE_SERVER_IP = "YZ"
with sshtunnel.open_tunnel(
(REMOTE_SERVER_IP, 22),
ssh_username="foo",
ssh_pkey="/home/me/.ssh/jump-key",
ssh_private_key_password="",
remote_bind_address=(PRIVATE_SERVER_IP, 5432),
local_bind_address=('0.0.0.0', 5455)
) as tunnel:
print(tunnel.local_bind_port)
while True:
sleep(1)
So sorry, it seems I got one of the parameters wrong, setting remote_bind_address
to the YZ IP worked.
We're trying to use the plugin to set up a connection to an internal database using a SSH tunnel.
The same connection works fine using a VPN (either directly or using the plugin), or using a SSH tunnel via a terminal:
The hosts are set up in
~/.ssh/config
:However, when configured using this plugin, the connection is shown as established (a green dot in the Connections list), but the DB connection itself fails with:
Plugin connections config follows:
Did you encounter anything similar or have any pointers which way to go? We'd be glad to help and participate in the solution.