0

I'm having problems establishing a connection. I set up the machine specifically to test the possibility of connecting it to JetBrains Gateway using Azure AD credentials, and without SSH keys.

More information:

  1. I used an Ubuntu Server 20.04 LTS image to build the VM.
  2. In the Management Tab, I marked the "Login with Azure AD" option.
  3. Authentication time for the administrator is Password.
  4. I added the "Virtual Machine Administrator Login" role for the resource group created for the VM to the user with which I am trying to access the VM.
  5. My Linux VM has the AADSSHLoginForLinux extension (added from the "Login with Azure AD" option). In addition, I tried to use the AADLogin third-party tool.

When I am trying to SSH into the Liux VM using a terminal, then:

  • If I use the Azure CLI, I get logged in immediately.
  • Without the Azure CLI, using the SSH command, with my username, domain name and Linux VM Public IP, I am first referred to open a web browser so that I can perform authentication there. Then, after successful completion, I return to the terminal, press ENTER, and I am logged in. [I think this option is only available because of the AADLogin third-party tool, which is deprecated].

When I am trying to do the same process with JetBrains Gateway (through PyCharm, specifically), I cannot establish a connection. So far one of two things happenned:

  1. I am asked for a One-Time Password.
  2. I get a window displaying the same referral link (and instructions) as in the terminal. After completing authentication on the webpage and returning to PyCharm, and pressing ENTER, I get an error from within JetBrains Gateway.

I really want to find a way where I can login to my Azure Linux VMs with JetBrains Gataway, without using SSH keys, through Azure AD credentials only. Is that possible?

1 Answers1

0

I tried to reproduce the same in my environment and got the results like below:

Created Virtual machine and Enabled with Login into Azure AD like below:

![enter image description here](https://i.imgur.com/ihQr5ga.png) .

![enter image description here](https://i.imgur.com/LEGvqdS.png)

I added the Virtual Machine Administrator Login role and Virtual Machine User Login to the resource group level

Now, when I tried to log in with JetBrains Gateway adding a new connection

enter image description here

enter image description here

When I tried to login with my credentials it connected successfully like below:

![enter image description here](https://i.imgur.com/rBosp1R.png)

Imran
  • 3,875
  • 2
  • 3
  • 12
  • Thank you very much for answering! I'm trying to reproduce your reproduction, and I have a few questions: (1) Are you using your admin password for access? Can regular users SSH into the Linux VM use their Azure AD, given they have only a Virtual Machine User Login role? (2) In the last screenshot in JetBrains Gateway, how is the connection port 2222 when you specified port 22? – Louie_the_unsolver Apr 03 '23 at 13:42
  • Yes, you can use admin password for access ...and try to add virtual machine user login also..i added NSG inbound port rule 22 ..you can directly add 2222 also – Imran Apr 03 '23 at 13:47
  • Why can't users use their own Azure AD password? Must they use the admin password? – Louie_the_unsolver Apr 03 '23 at 14:01
  • 1
    So always admin password? – Louie_the_unsolver Apr 03 '23 at 14:17
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/252945/discussion-between-louie-the-unsolver-and-imran). – Louie_the_unsolver Apr 03 '23 at 14:40
  • But how then is this using Azure AD? – Louie_the_unsolver Apr 03 '23 at 14:52