Unable to use MFA For SSH Remote Editing or Interpreters
Answered
The remote servers I'd like to connect to (both for editing and remote interpreters) requires MFA using google authenticator.
I see some references to support for this, at least for interpreters (https://blog.jetbrains.com/pycharm/2017/02/pycharm-2017-1-eap-7/), but cannot get it to work myself. I don't even see the option for it when adding a remote in either section.
Is this supported?
Thanks,
Tim
Please sign in to leave a comment.
Forgot to mention that I'm running PyCharm 2018.1.
Hi Torme,
Yes, it is supported. When you configure remote interpreter via SSH, after specifying password (or keypair) you should be prompted for the code. Have you tried that?
If yes, what happens then?
Yeah, I selected a private key pair (the same one I use to SSH normally) and click next. It tries to connect, but then bumps me back to the previous screen with "Connnetion to torme@(host) failed: Authentication failure". I don't receive a prompt asking for an MFA token at all.
To clarify as well, I'm able to login successfully via SSH using this same private key pair.
Please reproduce the problem and then upload your logs folder zipped (Help | Compress Logs and Show in...) to https://uploads.services.jetbrains.com/ and let me know the name of that zip file.
Sorry for the delay here. I've added it and the file name is
Thanks!
Tim
Thanks!
Could you please make sure that connection is not blocked by firewall/antivirus? Try disabling them.
Please also try setting SFTP deployment to that remote host (https://www.jetbrains.com/help/pycharm/deploying-applications.html) and then, if successful, try adding SSH interpreter using Existing server configuration.
I don't think I have any firewall or antivirus software that would interfere, given that this works from other applications.
But, trying via the SFTP deployment yields more informative error messages at least:
Seems that its unable to determine the auth type based on the prompt.
Please press Ctrl
+Opt+Shift+/, click Registry, search for deployment.BouncyCastleJCE and enable it.Then, restart PyCharm and check if it helped.
Please check that your IP is allowed.
If nothing helps, add the following lines to "Help | Debug Log Settings...", reproduce the issue with SFTP deployment (testing connection should be enough) and provide updated idea.log.
Lines to add:
#com.intellij.ssh
#com.jetbrains.plugins.webDeployment
Seems to have the same issue:
I added the debugging output as well.
Thanks!
Seems to be similar to https://youtrack.jetbrains.com/issue/PY-32594. Please check the workaround (https://youtrack.jetbrains.com/issue/PY-32594#focus=streamItem-27-3162151-0-0) and feel free to leave a comment.