Is it possible for JetBrains Gateway to connect to an Azure Linux VM using Azure AD credentials only?

297 Views Asked by At

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

There are 1 best solutions below

6
Imran On

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)