How to remote debugging on a multi jump remote

I’m a network engineer and I hold all of my script on a remote server. The problem is that to remote to that server I have to jump to one server first and then to the server where I have all of my scripts. There is no way that I can do it any other way since the script that I use has to be locate in that server where all the engineers connect to the network equipments. My question is; is there a way to to have Komodo remote to sever a and from server a to b and do the debugging from there? This is debugging for Python and Perl. Thanks

You will need to set up a dbgp proxy on your jumphost to handle this, I think. Alternatively, you might want to see if you can set up port forwarding via ssh (if you’re using that) and debug that way.

(Note that for architectural reasons, you actually have the application on b connect to a, and the proxy on a connect to Komodo on your workstation, instead of in the other direction; but that basically amounts to the same thing anyway.)

If you have ssh access, then I find the best method (and most secure) is to use ssh port forwarding.

There are are a few variations of ssh port forwarding, I’ll be demonstrating a combination of local port forwarding and remote port forarding, where a connection on the remote machine is forwarded (through ssh) to your Komodo machine (Note that the Komodo machine is where Komodo is running and the remote machine is where the code is being executed):

# Connect a ssh port (on localhost 2022) to the middle machine. This will forward on
# connections to the remote machine (which is visible from middlemachine).
ssh -L localhost:2022:remotemachine:22 middlemachine
# Set up a reverse port forward from remote machine to local Komodo debugger
# over the already forwarded ssh connection of port 2022.
ssh -o port=2022 -R 9000:localhost:9000 localhost

Once setup, you should be able to set Komodo to listen for connections locally on port 9000, and set the remote machine to connect to the debugger on it’s local port 9000 and the ssh tunnel will pass the connection between the three machines.

There may be simpler methods, but this works for me :stuck_out_tongue:

I’m on a windows 7 computer and I use secure crt to ssh to the middle machine host. I’m not sure how to do that with secure crt since cmd does not have ssh. To be more clear: Let say that I ssh to 192.168.1.202 and from 192.168.1.202, I ssh to 10.10.10.5.

Also, keep in my that I don’t manage those remote and middle server.

I don’t know the steps for SecureCRT - but it looks like they have some UI to control port forwarding:
http://www.vandyke.com/solutions/port_forwarding/appendix_a.html

It does mention Port forwarding configuration has been integrated into the tree-based Session Options dialog allowing easier configuration for securing TCP/IP application data.

Cheers,
Todd