Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Why is ssh to backend from frontend VMs blocked ? Question is how to enable SSH for backend ?

Having this rile :

allow-traffic-frontend-backend – Ingress – backend-sa@my-lab-1-257502.iam.gserviceaccount.com – Service account: frontend-sa@my-lab-1-257502.iam.gserviceaccount.com – tcp:80,443,22; icmp – Allow – 1000

Receive : Permission denied (publickey). << error  

Question is how to enable SSH for backend ?

2 Answers

Hello skemail.  Unfortunately, I’m not sure what’s wrong based just on the info you’ve provided.  Have you set up a rule to allow incoming port 22 (SSH) traffic to the backend instance to which you want to connect?  And have you also made sure to activate that rule (if, for example, it is set to use a network tag)?

Hello skemail.

Based on the limited information provided, it seems to me that your issue is not a firewall issue but probably a private/public Certificate issue. If you want to be able to SSH into your backend servers from your frontend servers (not a good idea to allow such a rule by the way), you need to use the private key of your backend server when establishing the SSH session.

When on the GCP console you use the "SSH" button to SSH through the public IP of an instance, GCP handles that for you. But if you try the same thing using Putty for example, you would need the private key of the instance.

I hope this helps.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?