After clearing a project and instance of SSH key metadata and running gcloud compute ssh (which will create a new key pair and update project metadata), I am no longer able to SSH in without getting the "ssh: connect to host ..*.133 port 22: Connection refused" error.
I have read through every forum I can find involving this issue, yet I cannot come to a solution. I am even unable to connect through cloud shell terminal.
Is there something blatantly wrong with what I did?
Best Answer
You can check if the instance is open to connections on port 22 by running
sudo nmap -Pn -p 22 <instance IP>
.If you have port 22 open in the instance you should check the serial console output for errors in sshd.
If there are no errors, try testing connectivity to the instance by using
telnet IP 22
. You should get the SSH prompt. When testing try the internal IP and the external one (if you have one). If there is no SSH prompt, this would indicate that the service is down in the other instances. You might also try connecting to other VMs using the browser or the serial console to verify the service status.