Ensure the SSH tunnel port number is honoured. Fixes #3471

pull/14/head
Akshay Joshi 2018-07-19 10:52:16 +01:00 committed by Dave Page
parent ce768c7f8a
commit 051ce6afeb
2 changed files with 4 additions and 3 deletions

View File

@ -27,3 +27,4 @@ Bug fixes
| `Bug #3448 <https://redmine.postgresql.org/issues/3448>`_ - Exclude system columns in Import/Export. | `Bug #3448 <https://redmine.postgresql.org/issues/3448>`_ - Exclude system columns in Import/Export.
| `Bug #3457 <https://redmine.postgresql.org/issues/3457>`_ - Fix debugging of procedures in EPAS packages. | `Bug #3457 <https://redmine.postgresql.org/issues/3457>`_ - Fix debugging of procedures in EPAS packages.
| `Bug #3468 <https://redmine.postgresql.org/issues/3468>`_ - Support SSH tunneling with keys that don't have a passphrase. | `Bug #3468 <https://redmine.postgresql.org/issues/3468>`_ - Support SSH tunneling with keys that don't have a passphrase.
| `Bug #3471 <https://redmine.postgresql.org/issues/3471>`_ - Ensure the SSH tunnel port number is honoured.

View File

@ -400,7 +400,7 @@ WHERE db.oid = {0}""".format(did))
# and password # and password
if self.tunnel_authentication == 1: if self.tunnel_authentication == 1:
self.tunnel_object = SSHTunnelForwarder( self.tunnel_object = SSHTunnelForwarder(
self.tunnel_host, (self.tunnel_host, int(self.tunnel_port)),
ssh_username=self.tunnel_username, ssh_username=self.tunnel_username,
ssh_pkey=get_complete_file_path(self.tunnel_identity_file), ssh_pkey=get_complete_file_path(self.tunnel_identity_file),
ssh_private_key_password=tunnel_password, ssh_private_key_password=tunnel_password,
@ -408,7 +408,7 @@ WHERE db.oid = {0}""".format(did))
) )
else: else:
self.tunnel_object = SSHTunnelForwarder( self.tunnel_object = SSHTunnelForwarder(
self.tunnel_host, (self.tunnel_host, int(self.tunnel_port)),
ssh_username=self.tunnel_username, ssh_username=self.tunnel_username,
ssh_password=tunnel_password, ssh_password=tunnel_password,
remote_bind_address=(self.host, self.port) remote_bind_address=(self.host, self.port)