gcloud auth activate-service-account需要访问.ssh文件夹吗?

9

我运行 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,我已经提供了密钥的路径。
1个回答

6

“服务帐号密钥”和“用于实例的SSH密钥”之间存在差异。

服务帐号密钥允许您访问GCP。您需要它来设置SSH密钥。

SSH密钥允许您登录特定的实例。仅当您拥有GCP访问权限(例如通过服务帐号密钥)时,才能设置SSH密钥。但是SSH程序通过SSH密钥运行,因此您需要设置一个SSH密钥。

您可以使用“--ssh-key-file”标志更改SSH密钥写入的位置。有关详细信息,请参阅“gcloud compute ssh”的文档


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接