Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

i can't connect to instance using ssh through cloud shell

i can't connect to instance using ssh through cloud shell but when i using --troubleshoot 0 issue(s) found

Monosnap VM instances – Compute Engine – citeco-erp – Google Cloud console 2023-06-08 14-14-08.png

 

1 3 866
3 REPLIES 3

Hello @DuyDinhVan,

Welcome to google Cloud Community!

Verify that there is already a firewall rule that allows SSH access (port 22).

If there's none, create a custom firewall rule allowing tcp traffic on port 22. You can use this command to resolve the issue.

gcloud compute firewall-rules create FIREWALL_NAME \
  --allow tcp:22

There is already a default firewall rule that allows SSH access (port 22). I still create a new firewall rule that allows SSH access (port 22) like your comment but  it still error and using --troubleshoot 0 issue(s) founderror.png

SSH access is already permitted by default (port 22) in the firewall rule. Like you suggested, I continue to establish a new firewall rule that permits SSH access (port 22), but it still errors and reports 0 issue(s) identified when I use the --troubleshoot option.