golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/windows/ssh.bash (about) 1 #!/bin/bash 2 3 # Copyright 2017 The Go Authors. All rights reserved. 4 # Use of this source code is governed by a BSD-style 5 # license that can be found in the LICENSE file. 6 7 set -eu 8 9 ZONE=us-central1-f 10 INSTANCE_NAME="${1:-golang-buildlet}" 11 12 username="gopher" 13 password="gopher" 14 ip=$(gcloud compute instances describe "${INSTANCE_NAME}" --project="${PROJECT_ID}" --zone="${ZONE}" --format="value(networkInterfaces[0].networkIP)") 15 16 echo "" 17 echo "Connecting to instance ${INSTANCE_NAME}" 18 echo "" 19 echo "When prompted for password, use: ${password}" 20 echo "" 21 ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no gopher@${ip}