func GetAuthorizedKeys() (map[string]bool, error) {
	req, err := http.NewRequest("GET",
		"http://metadata.google.internal/computeMetadata/v1/project/attributes/ssh-keys",
		nil)
	if err != nil {
		return nil, fmt.Errorf("building the request: %v", err)
	}
	req.Header.Set("Metadata-Flavor", "Google")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, fmt.Errorf("sending request: %v", err)
	}
	keysBytes, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return nil, fmt.Errorf("reading response: %v", err)
	}
	authorizedKeys := make(map[string]bool)
	for len(keysBytes) > 0 {
		key, _, _, rest, err := ssh.ParseAuthorizedKey(keysBytes)
		if err != nil {
			return nil, fmt.Errorf("parsing authorized key: %v", err)
		}
		authorizedKeys[string(key.Marshal())] = true
		keysBytes = rest
	}
	return authorizedKeys, nil
}
GetAuthorizedKeys returns the set of authorized SSH keys.
package gce
import (
	"fmt"
	"io/ioutil"
	"net/http"
	"golang.org/x/crypto/ssh"
)