簡體   English   中英

gcloud auth activate-service-account需要訪問.ssh文件夾?

[英]gcloud auth activate-service-account needs access to .ssh folder?

我運行gcloud auth activate-service-account --key-file=pathtokey

然后我運行:

gcloud compute scp sdfsdfsdfsdf.txt myinst:/tmp --zone us-east1-b

我得到這個錯誤:

WARNING: The PuTTY PPK SSH key file for gcloud does not exist.
WARNING: The public SSH key file for gcloud does not exist.
WARNING: The private SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
open C:\Windows\system32\config\systemprofile\.ssh\google_compute_engine: The system cannot find the path specified.

我不明白,為什么它需要訪問.ssh我只是給了它密鑰的路徑

服務帳戶密鑰和用於實例的SSH密鑰之間有區別。

服務帳戶密鑰可讓您訪問GCP。 您需要它來設置SSH密鑰。

SSH密鑰使您可以登錄到特定實例。 如果您具有GCP訪問權限(例如,通過服務帳戶密鑰),則只能設置一個。 但是SSH程序通過SSH密鑰運行,因此您需要進行一次設置。

您可以使用--ssh-key-file標志更改寫入SSH密鑰的位置。 有關更多信息,請參見gcloud compute ssh文檔

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM