I spun up a Ubuntu 16.04 VM on Google Cloud Platform and tried following steps one to three on setting the VM up.
Instead of ssh root#your_server_ip (step one), I just went to the console, clicked on the drop-down under the Connect column in "VM instances" and selected "Open in browser window". Then I followed steps two and three to create a new user and to give it root privileges.
Skipping the 'recommended' steps 4 and 5, I tried step 6 to do a test log in by activating the Cloud Shell. But ssh [user created in step 2]#your_server_ip, where your_server_ip is the "External IP" in the "VM instances" page results in "Permission denied (publickey)."
Why is this?
Martheen comment is right, you need to generate the ssh key pair in order to ssh.
As you are using the Google Cloud platform I will point you to the documentation related there.
You can use the GCP ways to connect to the instance here.
Other methods to connect you can find here.
Related
I use GCP's vertex ai platform's "user-managed notebook" service. how do i enable real-time collaboration for the jupyter lab server? it sounds like this can be enabled by adding --collaborative when running jupyter lab. but the command is not exposed to me with vertex ai notebooks.
You can activate the collaboration feature by doing the following steps below:
Go to GCP Console > Vertex AI > Workbench and identify the notebook you want to use.
Click the notebook name to open notebook information
Click "VIEW VM DETAILS"
You will be redirected to Compute Engine > VM Instances and it shows your notebook details
Click "EDIT" and look for the section "Metadata"
Under "Metadata", click "+ Add Item" and assign value "use-collaborative" at key and "true" at value
Click "SAVE"
Restart the VM by clicking "STOP" and wait for the operation to finish
Click "START / RESUME" to start the VM and you should be able to use the collaboration feature.
To share your notebook:
Make sure that you give the user the correct permission in your IAM & Admin > IAM. See predefined notebook permissions.
Open Jupyter lab and open a Python notebook. Copy the URL of the notebook and you could share this and be able to collaborate with users that were given the correct permissions.
The URL is in this format https://xxxxxxx-dot-us-west1.notebooks.googleusercontent.com/lab/tree/your_sharable_notebook.ipynb
NOTE: I tested the steps above by giving IAM permission "Notebooks Admin" to a colleague of mine.
I created a VM Instance (n1-standard-8) for a project. I was using AI Platform > Workbench (Jupyter Notebook). I was able to read the data from Cloud storage and process it. After 2 months, I tried to start the notebook and clicked on 'OPEN JUPYTERLAB'. It just spins up saying "Setting up proxy to Jupyterlab".
Environment: Kaggle Python
Machine Type: n1-standard-8 (8 vCPUs, 30
GB RAM)
What is the possible issue?
PS: New to Google Cloud
One possible solution is to create a new VPC without adding the DNS rules for the various notebooks endpoints.
Then, use the configured network with a new notebook instance clicking the “OPEN JUPYTERLAB” URL.
You can see more information here.
Another possible thing that could be happening if you check your logs is an error that shows this “ - Required 'compute.instances.get' permission for project'”. This happens because you are using the non-default service account that you specified during the notebook creation. So the solution to this is to use the default service account.
I was trying to create VM instance on Google Could Platform, but it always gives me an error says Failed to load.
================
Answer
Found the solution by accident, I was browsing in the MarketPlace and trying to launch a Ubuntu 16.04 OS but end with this error
Compute Engine API has not been used in project xxxxxxxxxxx before or
it is disabled. Enable it by visiting
https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=xxxxxxxxxxx
then retry. If you enabled this API recently, wait a few minutes for
the action to propagate to our systems and retry.
So I goto the link mentioned in the above Error message. After I enabled Compute Engine API there I can find the Create Instance button in my VM instances section.
This error message is related to UI issues with cache and cookies. So to fix this you can try any of the following:
1.- Log In to GCP in an Incognito window.
2.- Clear/delete your web browser cache and cookies.
3.- Login to GCP through another web browser.
Please verify Compute Engine API is enabled in your project by following step 3 from this guide.
Additional, there was a known issue yesterday that prevent new projects to enable Compute Engine API and therefore not be able to create VM Instances. This issue has been fixed by now so you shoud be able to create this Instances with no problem.
I've just created a VM instance at GCP with os-login feature enabled. I can connect via ssh using web browser console, SDK, but, I can't connect using the android app called Cloud Console.
Is there any extra step while configuring os-login to use the offical google android app?
Thanks.
I believe everything should work out of the box. There certainly isn't mention of any extra documentation on the Cloud Console Mobile App landing page.
I spun up a new instance (europe-west4-b, n1-standard-1, debian-9-stretch-v20190813) and set the metadata to enable-oslogin = TRUE and I managed to connect right away, albeit from an iOS device.
I would suggest trying different networks (WiFi, 3G/4G), double check any suspicious firewall tags on the instance, maybe even try from a different device. If the connection attempt did reach the server, chances are there's at least one log entry mentioning it in /var/log (/var/log/auth.log in Debian is a good place to start).
I am running a ubuntu 18.04 VM on google cloud platform. I have had it working but now when I try to connect I get this error:
I am unsure what to do about this problem.
You need to add a firewall rule that allows tcp:22
Since you already tried using gcloud, double checked firewall rule and I suspect you did not change anything in the VM configuration, the easiest approach that you can do now is create a snapshot and move it to a new VM instance:
Go to Compute Engine section.
Then select “Snapshots” in the left menu.
Click “Create Snapshot”.
In “source disk” select your current VM instance, Encryption: automatic and provide the required information in the other fields.
Click “Create”.
After the snapshot is created you can go and use it to create a new VM. In the “Create instance” section do the following:
In “Boot Disk” click the “Change” button.
Click the “Snapshots” tab (upper right).
Select the previously created snapshot.
Click “select” and then “Create”.
You should be able to SSH into the new instance.