Search code examples
intellij-ideasshpycharmjetbrains-ideremote-server

How to Set Up a JetBrains IDE Remote Interpreter via an SSH Server Requiring Two Consecutive Passwords?


I am trying to set up a remote interpreter for my Python project via an SSH server. The server I'm dealing with requires two consecutive password entries for access.

Is it possible to configure PyCharm to handle this double-password setup?


Solution

  • As it stands, JetBrains doesn't currently offer to handle more than one password authentication directly. However, there's a simple method to utilize to bypass this limitation.

    You can use SSH tunnels to establish a local server that PyCharm can connect to. Suppose you want your local port to be 987 and your SSH server address is myServer (with the port 22). You can establish a tunnel using the following command:

    ssh -L localhost:987:localhost:22 myServer
    

    After establishing this tunnel, you can connect your JetBrains IDE (PyCharm in this case) to this local server. Use localhost as host and 987 as port. You'll need to provide your first username and password during this setup process within the IDE.

    enter image description here