有没有办法使用gcloud compute ssh实用程序远程执行命令
我知道可以像这样使用ssh(在文件中)远程执行命令有没有办法使用gcloud compute ssh实用程序远程执行命令,ssh,virtual-machine,gcloud,private-network,Ssh,Virtual Machine,Gcloud,Private Network,我知道可以像这样使用ssh(在文件中)远程执行命令 #/垃圾箱/垃圾箱 ssh${USER}@${SERVER_IP}只要您可以ssh到实例上,您就应该能够: gcloud计算ssh--command=“bash-s” #!/bin/sh ssh ${USER}@${SERVER_IP} <<EOF cd ${PROJECT_PATH} git pull exit EOF gcloud compute ssh vm-internal --zone us-central1-c
#/垃圾箱/垃圾箱
ssh${USER}@${SERVER_IP}只要您可以ssh到实例上,您就应该能够:
gcloud计算ssh--command=“bash-s”
#!/bin/sh
ssh ${USER}@${SERVER_IP} <<EOF
cd ${PROJECT_PATH}
git pull
exit
EOF
gcloud compute ssh vm-internal --zone us-central1-c --tunnel-through-iap << EOF
...
...
EOF
Automatic authentication with GCP CLI tools in Cloud Shell is disabled. To enable, please rerun command with `--authorize-session` flag.
Hello Freddie
Projects
README-cloudshell.txt -> /google/devshell/README-cloudshell.txt
stackoverflow