Search code examples
sshgcloudtty

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


How do I use gcloud compute ssh with ssh's -t flag (pseudo-terminal allocation)?


Solution

  • You can use --ssh-flag to pass the flags to the ssh command.

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