1

I am working on a project where a user clicks a link/button that says Access VM on a webpage, it should internally spin up a Linux based VM (using GCP, AWS or Azure) and provide the VM terminal in a new browser tab for the user to play around in the VM.

How can I achieve this using GCP/AWS/Azure? Which type of VM should I create so that the user can access the VM terminal over a browser without using an SSH client?

I tried creating a VM on Azure and explored the Bastion option. But this Bastion session should always be initiated from within the Azure portal.

Do we have any other option within GCP, AWS or Azure to achieve this?

I am looking for something similar to katacoda website.

Wojtek_B
  • 4,245
  • 1
  • 7
  • 21
John Seen
  • 701
  • 4
  • 15
  • 31
  • sagemaker / jupyter notebooks !? Depends on what you actually want the user to be able to run, etc. – luk2302 Mar 25 '21 at 13:34
  • Let's say I run a Linux VM with some bugs/issues on Azure and ask the users to fix them using the browser terminal and then run few scripts. To achieve this I need to provide access to the VM over a browser without relying on SSH clients. – John Seen Mar 25 '21 at 13:40
  • 1
    Why don't you want to use SSH? I know that Chrome has an in-browser SSH extension, and I'm sure that you can find something similar for your browser of choice. – Parsifal Mar 25 '21 at 16:25
  • You could also do something with VNC; I know there's a browser-based client for it as well (or at least there used to be; it might have been a Java applet). – Parsifal Mar 25 '21 at 16:26

1 Answers1

0

There's no built in feature in GCP that will allow such thing possible. There is a button "SSH" in the VM's list but you have to be able to view the list and also have the permission to connect to the instance. But that requires to actually log into GCP which I believe is not what you want.

**You could try and built some solution that after clicking an "Connect" button you your website would send a series of commands to GCP's API to create & connect to the new isntance. It's possible but rather complicated.

Have a look at the documentation how to connect to VM using browser - maybe it will give yolu some ideas.

Ultimately use many other 3rd party tools but you still need to provide an address and credentials - additionally you rely on a service that you don't control so you have to take security (and reliability) into consideration.

At the end you may also consider going through general information how to connect to GCP's instances.

Wojtek_B
  • 4,245
  • 1
  • 7
  • 21