我在Google Compute Engine上創建了一個實例,但似乎無法使用終端進行SSH。我使用的命令是:通過Mac OS X終端登錄Google Compute Engine實例
gcloud compute ssh example-instance
,我得到的錯誤是:
ERROR: (gcloud.compute.ssh) Could not SSH to the instance. It is possible that your SSH key has not propagated to the instance yet. Try running this command again. If you still cannot connect, verify that the firewall and instance are set to accept ssh traffic.
當我用Google搜索的錯誤,我被帶到了這個鏈接:Unable to SSH to Google Cloud
我去檢查過了這裏的防火牆規則https://cloud.google.com/compute/docs/troubleshooting#ssherrors和事情似乎很好。我也去了〜/ .ssh並檢查了google_compute_engine和google_compute_engine.pub,它們表明我的私鑰和公鑰存在。我在想我下一步該做什麼?這是否是Mac工作站特有的問題?
任何幫助將非常感激。
我建議還要通過故障排除[這裏](https://cloud.google.com/compute/docs/ssh-in-browser#ssherror)。這是關於從瀏覽器進行SSH連接的,但許多原因也適用於'gcloud compute ssh'。 –