Google Cloud SSH won't connect - google-cloud-platform

it seems I've run though everything and it will not connect,
I've verified my firewall is not blocking anything, I reset my ssh keys, I've set my user roles, and I've tried resolving it through the cloud shell.
Code: 4003
Reason: failed to connect to backend
You may be able to connect without using the Cloud Identity-Aware Proxy.
Anyone have any ideas? I just need this to work.
vm instance- OpenLiteSpeed Wordpress
zone- us-east4-b
machine type- n1-standard-1
cpu platform- Intel Broadwell

It seems you already tried to troubleshoot issue , I had similar issue so just want to know below
what is your role in project ( owner/editor)?
VM instance having external ip or not?
If firewall blocking it will give timeout error, its not timeout error.

Related

Google Compute Engine Unable to Access VM

I am unable to ssh into a VM on GCP Compute Engine
However, when I run the command with the --troubleshoot flag, it seems like everything is okay.
When I connect through the console, I get an error message saying "You cannot connect to the VM instance because of an unexpected error".
Also, other people from my organization are able to connect.
I am unable to figure out what the error is. Any help would be appreciated.
From the error message that you got "Permission denied (publickey)" you can check this documentation for further troubleshooting.
Further more you can investigate also the Identity-Aware Proxy (IAP).
If you use Identity-Aware Proxy (IAP) for TCP forwarding, update your custom firewall rule to accept traffic from IAP, then check your IAM permissions.
Update your custom firewall rule to allow traffic from 35.235.240.0/20, the IP address range that IAP uses for TCP forwarding. For more information, see Create a firewall rule.
Grant permissions to use IAP TCP forwarding, if you haven't already done so.
For the error message "You cannot connect to the VM instance because of an unexpected error".
The VM is booting up and sshd is not running yet. You can't connect to a VM before it is running.
To resolve this issue, wait until the VM has finished booting and try to connect again.
The firewall rule allowing SSH is missing or misconfigured. By default, Compute Engine VMs allow SSH access on port 22. If the default-allow-ssh rule is missing or misconfigured, you won't be able to connect to VMs.
To resolve this issue, Check your firewall rules and re-add or reconfigure default-allow-ssh.
sshd is running on a custom port. If you configured sshd to run on a port other than port 22, you won't be able to connect to your VM.
To resolve this issue, create a custom firewall rule allowing tcp traffic on the port that your sshd is running on using the following command:
gcloud compute firewall-rules create FIREWALL_NAME \
--allow tcp:PORT_NUMBER
For further troubleshooting on SSH you see this documentation on Common SSH errors.

Google Cloud Platform SSH error code 1006

I made an instance and connected SSH in my project. My project is for machine learning, so I opened jupyter notebook and ran it. But the terminal always sends me an error like this.
"Connection via Cloud Identity-Aware Proxy Failed
Code: 1006
Please ensure you can make a proper https connection to the IAP for TCP hostname:https://tunnel.cloudproxy.app.
You may be able to connect without using the Cloud Identity-Aware Proxy."
I have tried to create firewall rule but this doesn't work.
Someone says that this is because of session timeout. If it is, what can I do to solve it?

Identity-Aware Proxy Error in Google Cloud Platform 4003

I stopped the instance in GCM and rerun it again but I got this error:
Could anyone help?
According to Google Cloud FAQ:
Error Code 4003
This might mean the instance isn't listening on the port you're trying to connect to or the firewall is closed. Either of those issues could also cause the start-up connectivity test to the VM instance to fail.
As suggested, you should try connecting without Cloud Identity-Aware Proxy.
Check if your firewall rules allow SSH connection, you should look for default-allow-ssh
If the firewall and IAP do not resolve your issue, you can follow this guide: Troubleshooting SSH
I had the same problem couple of times, but they resolved themselves after couple of minutes.

GCP VM instance hosted Website showing connectino refused error message

I am trying to fix a website that is hosted on Google Cloud Platform using VM instance. The website is giving me a connection refused error message. I have checked that the firewall rules are set up and are provided to the VM instance.
The VM external IP is static and the same IP is present on both cloud DNS and GoDaddy.
I'm also unable to SSH into the instance.
The SSH screen is stuck here and is not loading any further
I have given the necessary permissions to the instance and the user (Compute Admin, Compute Instance Admin (v1)), but still no luck.
As the instance is created from a custom image, so later, I tried creating another instance with the same config and I was able to SSH from it. So, please find some screenshots attached below if those could be of any help
netstat -a
route -n
df -h
I am new to this so any help to fix the issue and get the website up and running would be highly appreciated.
If it worked at the second attempt (2nd Instance I mean), I suspect that the SSH service hasn't started properly. I would recommend you to check the Serial Port Output, and Accessing into the Instance through the serial port in order to be able to troubleshoot it.
Note that you'll need a user to access through the serial port. If you don't have any user created, you will be able to do so using an startup-script.
Hope this helps!

Server in Amazon Cloud not coming up after reboot

We have a server hosted in Amazon cloud which I'm accessing it remotely over ssh. I'm not aware of much details about the server setup. I had been given the IP and credentials to access it remotely.
Now, I have tried to reboot(sudo reboot) the server from the remote console. But after the reboot command, server is not coming up. I'm not able to access the server using the same IP & credentials. Could you please help me find what has gone wrong here? Does the server change its IP when we reboot ?
Thanks in advance.
-Dilip
If the server is not assigned an Elastic IP, the hostname changes upon every reboot.
Log into AWS console, find your instance and determine if the instance is assigned a hostname, or if it is assigned an elastic IP. Make sure you are using the correct information to log in.
Also, depending upon the shutdown behavior, the instance may be terminated on stop. If you log in and find your instance terminated I would suggest enabling termination protection to prevent this from occurring again.
If you are unable to log into the AWS console, I suggest contacting the server admin for further assistance.