Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Why did the SSH external IP Address fail?

When compared with what I learn in Azure discovery Day in Microsoft, i could perfrom a SSH to the external IP Address of a azure instance without issue. But during this lesson, I notice that if I try to perform a SSH to the external IP Address without running the gcloud compute ssh command, there will be error?

Can i check is it due to the fact that we did not create any credentials for the compute instances as a result public and private keys is not created?

I am bit confused

1 Answers

You asked, is it due to the fact that we did not create any credentials for the compute instances as a result public and private keys is not created? and the answer is Yes. 🙂

The gcloud compute ssh command that we ran in the lab is not doing anything entirely special, but it is conveniently doing a number of important steps that we would have had to do manually, ourselves, otherwise. It did the following:

  • Generated the public/private key pair;

  • Set the public key in the metadata, so that the instance would accept it; and then

  • Ran the normal ssh command with the right options–namely the public IP address of the instance (just like we had done before) and the private key file (which didn’t exist when we ran ssh directly, ourselves).

Does this help clarify?  It might be useful to both rewatch and redo the lab.  Oh, and also, when you get to the Basic Services Challenge Lab Data Flow lecture, I describe in a bit more detail how the SSH public key data flows to the instance.

Anyway, now that you’ve gone through the lab, go ahead and try to run the ssh command manually with the right options. Note that you’ll need to pay attention to a few extra options (like the user name), too, but I think you’ll find it to be an enlightening challenge. And if you get stuck, try to research the issue, first–and then if you’re still stuck, ask here on the forum with a description of the problem and what you’ve tried.

Cheers!

Mattias

Sign In
Welcome Back!

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

Get Started
Who’s going to be learning?