diff --git a/gcp/gce_ssh.sh b/gcp/gce_ssh.sh index 9754fb6d..750f0be0 100755 --- a/gcp/gce_ssh.sh +++ b/gcp/gce_ssh.sh @@ -42,7 +42,7 @@ and stopping you from getting stuck on the interactive zone prompt Example iteration if you don't have direct access or SSH keys to a client's VMs, you can use this to SSH for loop like so using the standard gcloud compute ssh argument of '--command': - for x in {1..10}; do gce_ssh.sh vm-\$x --command 'systemctl restart MYAPP.service'; echo; done + for x in {1..10}; do gce_ssh.sh vm-\$x --command 'sudo systemctl restart MYAPP.service'; echo; done Requires GCloud SDK to be installed, configured and authenticated "