All Questions
119 questions
0
votes
1
answer
467
views
gcloud SSL: CERTIFICATE_VERIFY_FAILED Error on SSH
I have installed google-cloud-sdk using binary on my MacBook M1. I just copied the package from official GCP site and add the path export PATH="/Users/ZSHAREE/google-cloud-sdk/bin:$PATH" to ...
0
votes
1
answer
63
views
After Start Compute VM Instance in GCP my VM external IP and SSH doesn't accessible
In Google Cloud Platform ( gcp ) I have some Compute VM where host my website. I need to stop some VM temporary. After passed some hour, I need to start VM again. My Compute VM has been started but My ...
0
votes
1
answer
35
views
What am I doing wrong with gcloud scp?
> ls *log
java_error_in_idea_12001.log java_error_in_idea_44386.log jbr_err_pid12001.log jbr_err_pid44386.log
> gcloud compute scp --zone "us-central1-c" ...
0
votes
1
answer
467
views
Google Cloud Platform Cloud Build - permission denied (publickey) when using gcloud CLI to access Compute Engine
I Have a Cube.js application running on a GCP Compute Engine VM, through docker compose, and I need to setup automatic continuous deployment.
The idea here is to always run a specific script on the VM ...
0
votes
1
answer
48
views
gcloud SSH failure
When trying to SSH to a gcloud vm i get the error
permission denied (publickey)
Key_exchange_identification: Connection closed by remote host
My pub key is correct in the metadata and I have ...
1
vote
0
answers
940
views
connection closed by [ip_address] port 22 on GCP instance
I was trying to mount a persistant disk with my GCP instance. From the official documentation of GCP on mounting persistent disk, for enabling automatic mounting disk on VM restart I should edit the &...
2
votes
0
answers
314
views
Why can't my Github Actions pipeline run gcloud commands properly trough SSH?
I'd like to automate the deployment of Docker containers to a VPS,
using gcloud auth configure-docker to set the proper docker credentials on the VPS.
This works fine when I'm
A: logged in as root in ...
0
votes
1
answer
148
views
Is there an automated way to update the SSH name when starting or restarting a Google/AWS cloud instance with the public IP address of that instance?
I often have a set of spot instances in stopped state at Google Cloud or Amazon AWS for various specific reasons.
When I start those instances I typically look up its public IP address and then update ...
0
votes
1
answer
74
views
Different results when running shell command via ssh CLI vs. ssh shell
I have some baffling behavior that I'm sure has a logical explanation, but I'm wasting a lot of time trying to figure out.
Basically I'm getting different results for lsb_release -cs when run in ...
1
vote
1
answer
255
views
How can I use a variable inside a --command option in gcloud ssh
gcloud compute ssh --zone ZONE INSTANCE --command 'bin/bash deploy.sh master'
In the above command, I running a script called deploy.sh which accepts git branch name as a parameter(master).
But I get ...
1
vote
1
answer
228
views
SSH connection problem after installing SSL in Google Cloud VM
I installed SSL Let's Encrypt on Google Cloud VM and now I can't access SSH connection. I can't even access it via https://console.cloud.google.com. I checked the Firewall rules, and the documentation,...
1
vote
0
answers
1k
views
Google Cloud SSH: /usr/bin/bash exited with return code [255]
Currently, I am running a data retriever on the cloud and save the data in the database on a docker container. Until today, I was able to ssh into the instance (and therefore the docker container), ...
1
vote
0
answers
180
views
Existing host keys found error when ssh in gcp vm instance , putty error: no supported authentication method available
I am getting the following error but some of my colleagues work just fine and ssh in without any issue.
Existing host keys found in /Users/xxx/.ssh/google_compute_known_hosts
1
vote
2
answers
4k
views
How to solve gcloud cli "4047: 'Failed to lookup instance'" error
Today, out of the blue, a long time working script give this error on one server:
# gcloud compute ssh root@my-server --command=/bin/ls --tunnel-through-iap --zone=my-zone
ERROR: (gcloud.compute....
1
vote
1
answer
679
views
gCloud instance: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
I'm getting the following error when I try to ssh into a Ubuntu 22.04 gcloud instance:
Ubuntu Version:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: ...
0
votes
1
answer
127
views
How to start a GCE instance before SSH connection?
How to ensure that a GCE instance is RUNNING before connecting it?
Because this only works when the instance status is already RUNNING:
gcloud compute ssh --zone $ZONE --project $PROJECT $...
0
votes
1
answer
1k
views
gcloud command with timeout option
Is it possible to set max_timeout for gcloud commands. Incase If I want to use gcloud ssh or scp in automation, to login to multiple servers. whole process getting stucked because of some instances ...
0
votes
1
answer
74
views
gcloud ssh and gcloud ssh --command inconsistent environments
I am new to gcp and the cli. I'm trying to write a script which creates a vm instance from deep learning image then runs a python script on it. Im following the doc here to create the deeplearning ...
0
votes
0
answers
29
views
SSH Issue from GCloud
so I've an ubuntu server on Google Cloud which I lost access to SSH somehow, I don't get any error when I try to login, It just keeps loading, and nothing happens, I assume It's because of proftpd or ...
0
votes
2
answers
417
views
GKE: how to close the connection to a pod after port-forwarding via bastion-host
I am working from my local machine with a database deployed in a pod in kubernetes. To connect to it, first up it is necessary to connect to a bastion host VM.
Basically, it is a double ssh tunnel: ...
0
votes
0
answers
1k
views
Unable to ssh VM after hardware configuration change
I followed the recommandation to reduce the size of my VM (number of CPU from 4 to 2 and memory from 16GO to 8 Go). After updating the configuration and restarting the VM i was not able to access the ...
1
vote
1
answer
3k
views
Is there any workaround for the permission denied (publickey) error in google cloud?
I am currently doing the Build and Secure Networks in Google Cloud: Challenge Lab from Google Cloud Skills Boost. I finished challenge number 1-5, but got stuck in challenge number 6:
In the Compute ...
3
votes
1
answer
873
views
gcloud compute scp - Connection Failed (Sometimes with 4010 Error Code)
"Connection Failed
You cannot connect to the VM instance because of an unexpected error. Wait a few moments and then try again."
When I tried to copy file from one virtual machine to another ...
2
votes
1
answer
981
views
Problem with Fedora SSH connection on Google Cloud
I am having problem with connecting to my new instance directly from the browser. This is literally a new instance of Fedora OS so I have not configured anything. It doesn't work out of the box.
I ...
2
votes
1
answer
3k
views
Existing host keys found error when ssh in gcp vm instance
When running gcloud beta compute ssh --zone xxx --internal-ip --project xxx xxx
I am getting the following error but some of my colleagues work just fine and ssh in without any issue.
Existing host ...
1
vote
1
answer
737
views
Create gcloud compute config-ssh with internal-IPs?
gcloud compute config-ssh works fine for listing all my VMs into the ssh config file, but I am not able to use this config file when the access from the external IP has been blocked due to firewall or ...
0
votes
0
answers
67
views
SSH connection to gcloud VM instance not working
I am using a VM instance with 30gb disk space. Cloning my projects into this instance. While I was cloning one project, it showed "disk is out of space". So, I turned off all the processes ...
0
votes
3
answers
458
views
How to recover private key from ~/.ssh/google_compute_engine
I am stuck while using a VM_instance on GC. I was granted to join an existing project and managed to create a VM Instance (let s call it myInstance).
GCP has created for me automatically user_first as ...
1
vote
1
answer
226
views
Automatically append ssh flags for gcloud cli
I am working on a project with multiple envs on gcloud
2 of the envs have a central 'bastion' server so when logging into the central filesystem I have to ssh twice
A colleague discovered that in ...
2
votes
1
answer
3k
views
can not connect to gcloud using ssh?
Using the promotionals credits (the 300$ opening account promotion), i used to connect my VM using SSH gcloud compute ssh instance_name all was fine.
End of promotional credits, i linked the project ...
1
vote
1
answer
4k
views
gcloud alternate ssh port connection
I'm just getting started with gcloud vm's and trying to secure them up a bit. If I change the ssh port, what switch/flag do I add to the gcloud command when using the gcloud command like this
gcloud ...
0
votes
1
answer
175
views
How to copy files from a SSH into a Google Cloud Repo
I could not use the "gcloud app deploy" inside of a SSH, so now I need to grab those files and bring them into my Google repo (my project) then deploy so I create the website with the files (...
1
vote
1
answer
222
views
GCloud commands not working with SSH (gcloud app deploy)
I am trying to do host this static website on Google App Engine and I am stuck on this crucial part of the process:
-bash: gcloud: command not found
I get into Google Cloud Platform, then login into ...
0
votes
1
answer
61
views
GCP Compute-engine ssh fails only inside files
I am trying to write script that starts VM, run a command and then stop it.
The code is (the project and zone are omitted for brevity):
gcloud compute instances start instance-1
gcloud compute ssh ...
1
vote
3
answers
493
views
Unable to SSH/gcloud into default Google Deep Learning VM
I created a new Google Deep Learning VM keeping all the defaults except for asking no GPU:
The VM instance was successfully launched:
But I cannot SSH into it:
Same issue when attempting to use ...
1
vote
1
answer
2k
views
Is there a way to execute commands remotely using gcloud compute ssh utility
I know it is possible to execute commands remotely using ssh (in a file) like so;
#!/bin/sh
ssh ${USER}@${SERVER_IP} <<EOF
cd ${PROJECT_PATH}
git pull
exit
EOF
my question is this: it ...
0
votes
1
answer
572
views
GCP Compute Engine // Connection refused ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]
Working on GCE.. I think boot disk exceed capacity. Suddenly freeze.
and following error occurred when
gcloud compute ssh
ssh: connect to host {my external address} port 22: Connection refused
ERROR: ...
0
votes
1
answer
2k
views
Unable to ssh to master node of Google Cloud Dataproc, but can ssh to Compute Engine VM
I am having no trouble sshing into a Google Cloud compute engine VM, but am unable to ssh into the master node of a Google Cloud Dataproc cluster.
Specifically,
gcloud compute ssh my-vm
works just ...
0
votes
2
answers
137
views
SSH Into Google Cloud Compute Engine
Every time I try I receive this error
[email protected]: Permission denied (publickey).
Can anyone explain why? I have added the SSH key to the instance.
0
votes
1
answer
244
views
Unable to connect to gcloud
I am having trouble connecting to a Google Cloud virtual instance. I started up the virtual instance and was able to login as normal using gcloud beta compute ssh.
I then tried transferring files to ...
1
vote
1
answer
113
views
Connecting through VNC to an Shared Image from another Google Cloud Project
I am recently working on a project in Google Cloud Compute Engine, and I have created an image of my current work. In this instance I can access using VNC Viewer to a GUI like of the instance by using ...
0
votes
1
answer
298
views
How do I connect a Gcloud Virtual Machine to Colab using a local connection?
I am trying to combine gcloud VMs and Google Colab using the local runtime connection.
gcloud compute ssh [Instance] --zone [ZONE] -- -L 8080:localhost:8080 -N -T
Connection is established but the ...
-3
votes
1
answer
421
views
Gcloud compute ssh --zone=us-east1-d --ssh-flag="-D" --ssh-flag="10000" --ssh-flag="-N" "spark-01-m" is not working
When I use the following command to set the ssh tunnel, I am getting the below error and I am unable to resolve it.
command: gcloud compute ssh --zone=us-east1-d --ssh-flag="-D" --ssh-flag="10000" --...
0
votes
1
answer
255
views
how to fix ssh on gcloud vm
Earlier today, I tried to connect to my google cloud vm instance via ssh, but I got an error saying:
An error occurred while communicating with the SSH server.
Check the server and the network ...
-1
votes
2
answers
349
views
SSH Port Forwarding from gcloud to my laptop behind NAT router
I have my ubuntu installed laptop on which website is running on the localhost. The problem is I don't have public IP. I have tried forwarding port through my public IP shown on whatsmyip but it doesn'...
0
votes
1
answer
312
views
gcloud compute -- Instance ssh-key metadata ignored?
Starting with a service account JSON key, I attempt to add a throwaway "foo" ssh key to the gcloud instances create metadata and then connect to the instance using vanilla ssh and the throwaway key.
...
0
votes
0
answers
92
views
import error when remotely executing gcloud compute command
I create a GCP instance with a prebuilt image (c3-deeplearning-tf-ent-1-15-cu100-20200313). I remotely executed "script.py" using the following command.
$ gcloud compute ssh me_as_user@instance -- '...
1
vote
1
answer
1k
views
With OS login, how to gcloud ssh from one GCE into another GCE?
I have two GCEs, both has OS login enabled:
1) a_vm provisioned with service account a_svc
2) b_vm provisioned with service account b_svc
a_svc has OS login access to b_vm.
a_svc has roles/compute....
0
votes
0
answers
172
views
ssh into Google Compute Engine without gcloud -> Permission denied (publickey)
I need to ssh into my Google Compute Engine instance (GCE) without using gloud compute ssh. gcloud works for me but I want to use ssh & sshfs to mount my GCE file system running Ubuntu 18 to my ...
1
vote
1
answer
2k
views
How do I use gcloud compute ssh with ssh's -t flag?
How do I use gcloud compute ssh with ssh's -t flag (pseudo-terminal allocation)?