Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why GCP's "Waiting for SSH key to propagate" takes so long?

I have encountered this kind of infamous "Waiting for SSH key to propagate." phrase in at least two cases:

  • Connecting to a virtual box via browser
  • Creating new DataLab instance

The question I have is - what happens and what makes it take so long? Is there any way around it, especially for DataLab?

Even if there is no solution, I would like to understand why it is so time consuming.

like image 832
Marcin Avatar asked Oct 29 '18 11:10

Marcin


1 Answers

GCP offers multiple way to login into your system through ssh. These are :

  • Through UI button which opens a browser based connection (pretty common)
  • Through command line utility gcloud
  • Pre-configured ssh-keys by users through ssh-client in our local terminal using a private key.

Generally, the third step is the fastest way but people often use first and second because of the ease of the utility provided by Google.

Now, the first and second steps are also fast but sometime it takes more time because during first and second steps google does following things:

      1. Create a secured ssh-key for you
      2. Create a secure session for browser interaction
      3. Waiting for the ssh keys to propagate from the system to the browser connection  
      4. Giving User the secured shell to work with 

Sometime it happens fast but sometime, it takes time because of network routing and connectivity. Hope this explain as I derived this inference by reading the documentation and working on GCP for long time.!!

like image 188
Nitin Kumar Singh Avatar answered Oct 25 '22 05:10

Nitin Kumar Singh