Closed GoogleCodeExporter closed 8 years ago
In this case, the Cloud SDK works exactly as ssh does (edited for
whitespace/personal information):
$ gcloud compute copy-files --zone asia-east1-c <hostname>:{1,2,3} /tmp --dry-run
/usr/local/bin/scp -i /Users/<user>/.ssh/google_compute_engine
-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no \
-o StrictHostKeyChecking=no -r \
<user>@<ip>:1 <user>@<ip>:2 <user>@<ip>:3 /tmp
$ gcloud compute copy-files --zone asia-east1-c '<hostname>:*' /tmp --dry-run
/usr/local/bin/scp -i /Users/<user>/.ssh/google_compute_engine \
-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no \
-o StrictHostKeyChecking=no -r \
<user>@<ip>:* /tmp
What you're looking for is '<hostname>:{1,2,3}', so that your shell doesn't
expand the `{1,2,3}`:
$ gcloud compute copy-files --zone asia-east1-c '<hostname>:{1,2,3}' /tmp --dry-run
/usr/local/bin/scp -i /Users/<user>/.ssh/google_compute_engine \
-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no \
-o StrictHostKeyChecking=no -r \
<user>@<ip>:{1,2,3} /tmp
This works exactly as you would like.
Original comment by z...@google.com
on 19 Nov 2015 at 3:18
Thanks!
Original comment by pdknsk
on 19 Nov 2015 at 11:09
Original issue reported on code.google.com by
pdknsk
on 7 Nov 2015 at 12:20