I'm trying to connect to a remote Clickhouse database through an SSH gateway (password, no keys). I know the database and SSH are both viable because I can access it through DBeaver. I'm trying to write some Python code that would query said database but the SSH tunnel doesn't want to connect. Here's my code (not querying at the moment, just trying to establish connection): import sshtunnel server = sshtunnel.SSHTunnelForwarder( ('jump_ip', 22), ssh_username="username", ssh_password="password", allow_agent=False, remote_bind_address=('database_ip', 8123), local_bind_address=('localhost', 8123)) server.start() server.close() When the runtime hits server.start(), I get BaseSSHTunnelForwarderError: Could not establish session to SSH gateway I checked multiple times that jump_ip and database_ip are in fact the correct ones, same for ssh_username and ssh_password. I used this as inspiration: https://github.com/ClickHouse/clickhouse-connect/blob/main/examples/ssh_tunnels.py Few months back, I've managed to successfully use paramiko to open a sftp connection (different destination than this one) so I'm a bit surprised why this is giving me such problems. I also successfully use clickhouse_connect library for a different database, no SSH for that one. Works without problems. What did I miss? Continue reading...