Configure an interpreter using SSH
Prerequisites
An ssh server should run on a remote host, since PyCharm runs remote interpreters via ssh-sessions.
If you want to copy your sources to a remote computer, create a deployment configuration, as described in the section Create a remote server configuration.
Configuring remote Python interpreter via SSH credentials
Create a new remote Python interpreter via SSH credentials
Ensure that you have downloaded and installed Python on your computer.
Do one of the following:
Click the Python Interpreter selector and choose Add New Interpreter.
Press Ctrl+Alt+S to open the project Settings/Preferences and go to . Click the Add Interpreter link next to the list of the available interpreters.
Select On SSH from the list of the available interpreter types.
Select an option to create a new SSH configuration, then specify server information (host, port, and username).
In the next dialog window, provide the authentication details to connect to the target server.
Select Password or Key pair (OpenSSH or PuTTY) and enter your password or passphrase. If Key pair (OpenSSH or PuTTY) is selected, specify:
Private key: location of the file with a private key
Passphrase: similar to a password, it serves to encrypt the private key.
Click Next to proceed.
Wait until PyCharm completes the introspection of the SSH server.
In the next dialog, you can select a type of Python environment to configure on the SSH server.
You can select a new or existing venv or use a System interpreter.
You can configure the path mappings between your local project and the server. To do that, click the Browse icon in the Sync folders field and enter the path to the local project folder and the path to the folder on the remote server.
Click Create to complete adding an interpreter.
Create a new remote Python interpreter using an SSH configuration
Ensure that you have downloaded and installed Python on your computer.
Do one of the following:
Click the Python Interpreter selector and choose Add New Interpreter.
Press Ctrl+Alt+S to open the project Settings/Preferences and go to . Click the Add Interpreter link next to the list of the available interpreters.
Select On SSH from the list of the available interpreter types.
Select an option to use an existing SSH configuration, then select the configuration from the list.
Alternatively, you can create a new SSH configuration from this dialog. Click next to the list of configurations:
Click , disable the Visible only for this project checkbox, and fill the required fields:
Once done, the newly created SSH configuration will appear in the list of available configurations. It will also become available in the SSH Deployment Configurations settings. Click Next to proceed:
Wait until PyCharm completes the introspection of the SSH server.
In the next dialog, you can select a type of Python environment to configure on the SSH server.
You can select a new or existing venv or use a System interpreter.
You can configure the path mappings between your local project and the server. To do that, click the Browse icon in the Sync folders field and enter the path to the local project folder and the path to the folder on the remote server.
Click Create to complete adding an interpreter.
When you change an SSH interpreter, you might need to synchronize the local content with the target server. Mind a notification balloon in the lower-right corner: You can choose to perform one of the following actions:
Auto-upload files to the server
Synchronize files and then enable auto-uploading