Skip to content

Instantly share code, notes, and snippets.

@shubhamagarwal92
Last active August 14, 2020 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shubhamagarwal92/ca010e3345e276801d7e10bfd7f0a79f to your computer and use it in GitHub Desktop.
Save shubhamagarwal92/ca010e3345e276801d7e10bfd7f0a79f to your computer and use it in GitHub Desktop.
ssh config for PyCharm

Pre-requisite: You should be able to do ssh without entering password. See this

Steps (Fig 1 and 2)

  1. Open project in PyCharm
  2. Make directory on server
  3. Test you can ssh without entering password. (Save your rsa key on server)
  4. Preferences -> Deployment
  5. Enable automatic upload https://www.jetbrains.com/help/pycharm/deployment-in-pycharm.html#upload-to-default-server
  6. First time upload your directory. Right click project folder -> deployment -> deploy to <machine_name>
  7. Add multiple directories if want to deploy on different servers.

https://www.jetbrains.com/help/pycharm/creating-a-remote-server-configuration.html https://www.jetbrains.com/help/pycharm/deployment-in-pycharm.html

Add remote python interpreter (Fig 3 and 4 in the comment)

https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html

  1. Preferences -> Project interpreter -> ssh interpreter -> new/existing
  2. Select exact conda path : /scratch/../anaconda3/env/name/python

If you have a code using relative paths: (Fig 5)

  1. Right click folder -> Mark as -> source root

For AWS, similarly the steps can be followed as mentioned here:

https://www.codementor.io/abhishake/pycharm-setup-for-aws-automatic-deployment-m7n8uu2n4

@shubhamagarwal92
Copy link
Author

1
2
3
4
5

@dishavarshney082
Copy link

in community edition for windows i can't find deployment option .. do i need to install professional edition?

@shubhamagarwal92
Copy link
Author

Hi @geekygirl123, I actually use the professional edition myself. Maybe, you are right that community edition doesn't support deployment.
However, if you are a student, you can register and get the professional edition for free.

@dishavarshney082
Copy link

Ok thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment