Marcin
Marcin

Reputation: 4289

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:

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.

Upvotes: 16

Views: 9177

Answers (2)

Akhilesh Kumar
Akhilesh Kumar

Reputation: 1

Change the default port from 22 to something else like 2222 and allow the port in firewall. it should start working, not sure what is the problem with default port 22.

Upvotes: 0

Nitin Kumar Singh
Nitin Kumar Singh

Reputation: 322

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.!!

Upvotes: 4

Related Questions