Dr. Fabien Tarrade
Dr. Fabien Tarrade

Reputation: 1706

how to configure pycharm to ssh a bastion host using putty or OpenSSH

I am trying to ssh a bastion using pycharm PyCharm 2018.1 on a Windows 7 machine using putty.

I found some documentation to ssh a server and this work without any issues: https://www.jetbrains.com/help/pycharm/tutorial-using-the-product-built-in-ssh-terminal-and-remote-ssh-external-tools.html

For the bastion server, it seems that pycharm doesn't allow such conection (in the config I only see login and server name as parameters). I tried to put in the putty configuration to the bastion server a tunnel to a localhost. On my window machine I see the port of my localhost.

The issue is that I don't manage to connect pycharm to the localhost. It expect a login and a pwd while I just have the localhost name.

I see in a post from last year that "if you are using a bastion host (also referred to as a jump host), you’ll be very happy to know that PyCharm 2017.3 supports SSH config files. Even on Windows." https://blog.jetbrains.com/pycharm/2017/10/pycharm-2017-3-eap-5/

Any idea how to have it working either with the localhoast of using OpenSSH and SSH config file ?

Upvotes: 1

Views: 1583

Answers (1)

Dr. Fabien Tarrade
Dr. Fabien Tarrade

Reputation: 1706

The issue was the localhost.Using plink directly is working with no problem using same commands than regular ssh: plink.exe -L 9009:server:22 user@bastion. With Putty it doesn't work (first the IP was 0.0.0.0:port instead of 127.0.0.1:port even with the right port pycharm failed to connect with it work when I use plink directly).

This thread was helping: https://serverfault.com/questions/387772/ssh-reverse-port-forwarding-with-putty-how-to-specify-bind-address

Upvotes: 1

Related Questions