如何将 gcloud compute ssh 与 ssh 的 -t 标志一起使用?

How do I use gcloud compute ssh with ssh's -t flag?

如何将 gcloud compute ssh 与 ssh 的 -t 标志(伪终端分配)一起使用?

您可以使用 --ssh-flag 将标志传递给 ssh 命令。

gcloud compute ssh INSTANCE --zone=ZONE --ssh-flag="-t"