Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-15-2022 12:50 PM
Hello everyone!
I am trying to connect to a hosted instance of neo4j via SSHTunnel in Python code like this:
self.tunnel = SSHTunnelForwarder(
(self.creds["SSH_HOST"]),
ssh_username=self.creds["SSH_USER"],
ssh_password=self.creds["SSH_PW"],
remote_bind_address=("::", self.creds["NEO4J_PORT"])
)
self.tunnel.start()
neo4j_dev = f"bolt://localhost:{self.tunnel.local_bind_port}"
self.driver = GraphDatabase.driver(neo4j_dev, auth=(self.creds["NEO4J_USER"], self.creds["NEO4J_PW"]))
But the connection is always refused:
Transaction failed and will be retried in 6.720614725277616s (Couldn't connect to localhost:61958 (resolved to ()):
Failed to establish connection to ResolvedIPv6Address(('::1', 61958, 0, 0)) (reason [WinError 10061] No connection could be made because the target machine actively refused it)
If open a tunnel via the terminal and put the port in the URI it works.
Can anyone help me?
All the sessions of the conference are now available online