0

I was about to upload something and restart some apps on my VM, I got to the phase of Transfering SSH keys, and after that, I got the following error: Connection Failed: You cannot connect to the VM instance because of an unexpected error. Wait a few moments and then try again.

When I click "Troubleshoot", VM Status is OK< User Permissions OK, but Network status is loading without stop.

My other VM instance on another project is working. I haven't changed anything in VM or project configuration. I have the default-allow-ssh rule. Is there a problem on my side or should I simply wait for Google to solve it?

enter image description here

The web application on VM is working well/ I just can't access SSH.

Last week I accidentally deleted my user folder, then I remade it and give it all permissions. Does that event have any connection with this problem maybe?

LosmiNCL
  • 33
  • 3
  • 11

2 Answers2

1

Use the SSH troubleshooting tool to help determine why an SSH connection failed. The troubleshooting tool performs the following tests to check for the cause of failed SSH connections:

User permissions tests: Checks if you have the required IAM permissions to connect to the VM using SSH.

Network connectivity tests: Checks if the VM is connected to the network. VM instance status tests: Checks the VM's CPU status to see if the VM is running. VPC settings tests: Checks the default SSH port.

Check the Network Connectivity: The interactive serial console does not support IP-based access restrictions such as IP allowlists. If you enable the interactive serial console on an instance, clients can attempt to connect to that instance from any IP address.

Anybody can connect to that instance if they know the correct SSH key, username, project ID, zone, and instance name. Use firewall rules to control access to your network and specific ports.

Your network must meet the following requirements:

HTTPS proxies and security devices must not decrypt and re-encrypt traffic using their own TLS certificate, for example, to perform TLS inspection.

The network must allow traffic to and from hostnames ending in google.com, gstatic.com, or googleapis.com. The network must allow packets to be sent to the IP addresses for the default domain.

Also Make sure not to delete any user folders because while recreating we may not get all the configurations which were used before.

Refer to Unable to SSH onto GCE VM and Recover deleted folder from Google VPS for more information.

Srividya
  • 260
  • 1
  • 8
  • If the answer was useful, please mark the answer as accepted for greater visibility for the community or upvote if the answer has some useful information. – Sai Chandini Routhu Jul 29 '22 at 08:41
0

Can you telnet the 22 port from your client device ?

telnet x.x.x.x 22

Do you have a console access to your VM on GCP ?

If so, can you try to check the logs ? It should be located somewhere inside /var/log.

From the VM do you have access to Internet ?

Maybe some change in the google compute instance ? (Dynamic IP, Maintenance, network rule,... ?)

If google is detecting network issue, it might be it.

  • I can connect if I use a different google account. It seems it's something connected to many accounts. Permissions were not changed, but maybe I deleted something that time when I deleted my user folder once (and I've remade it with permissions, but maybe I didn't return all the configs). – LosmiNCL Jul 25 '22 at 12:43