ssh - paramiko.ssh_exception.SSHException: TCP forwarding request denied -


i using paramiko's rforward.py demo script demonstrates how reverse ssh tunnel works. code contains following lines:
transport.request_port_forward('', server_port)

when run code, following error:

traceback (most recent call last):   file "c:\users\name\documents\bh_python\rforward.py", line 167, in <modul e>     main()   file "c:\users\name\documents\bh_python\rforward.py", line 160, in main     reverse_forward_tunnel(options.port, remote[0], remote[1], client.get_transp ort())   file "c:\users\name\documents\bh_python\rforward.py", line 73, in reverse _forward_tunnel     transport.request_port_forward('', server_port)   file "build\bdist.win32\egg\paramiko\transport.py", line 775, in request_port_ forward paramiko.ssh_exception.sshexception: tcp forwarding request denied 

here transport.request_port_forward code in question:

def request_port_forward(self, address, port, handler=none):         if not self.active:             raise sshexception('ssh session not active')         port = int(port)         response = self.global_request('tcpip-forward', (address, port), wait=true)         if response none:             raise sshexception('tcp forwarding request denied')         if port == 0:             port = response.get_int()         if handler none:             def default_handler(channel, src_addr, dest_addr_port):                 #src_addr, src_port = src_addr_port                 #dest_addr, dest_port = dest_addr_port                 self._queue_incoming_channel(channel)             handler = default_handler         self._tcp_handler = handler         return port` 

it seems system denying request port forwarding. how can verify , fix issue? running on windows 7.

that sounds being blocked on server. while i'm not familiar windows, believe should possible install ssh command-line client , attempt duplicate ssh client you're doing paramiko. if works ssh client, know there's issue code. otherwise have server configuration issue.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -