PyCharm remote debugging about double SSH

Viewed 591

Using PyCharm remote debugging is one of my favorite choices when doing deep learning jobs on Server platform. But recently I face a problem is that I have to first use SSH to login the platform then I will need another SSH to access the computing node. I may have to do this using my shell.

ssh myname@myip
ssh mynode
python myfile.py

Thus, usually when I use PyCharm. I can only do as the following:

ssh myname@myip
python myfile.py

My question is: how I can use PyCharm to double my SSH operation?

1 Answers

Generally, I use MobaXterm as the intermediate jump tools.

  1. Choose Tunneling toolbar, you will get a dialog like this 1st step
  2. Click the gear in settings box,and then edit the local port forwarding like this 2nd step
  3. The final step, adding remote interpreter in pycharm:

    3.1. Choose ssh interpreter

    3.2. The host should be localhost, and port is the one mapped to your own PC. Then enter your username and follow the dialog.

    Here is the figure of 3rd step

Related