---
title: "POST /v1/{+parent}:signSshPublicKey"
method: POST
path: "/v1/{+parent}:signSshPublicKey"
tags: ["projects"]
---

# POST /v1/{+parent}:signSshPublicKey

`POST /v1/{+parent}:signSshPublicKey`

Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.

## Path parameters

- `parent` string, required

## Request body

- SignSshPublicKeyRequest — A request message for signing an SSH public key.
  - `serviceAccount` string — Optional. The service account for the instance. If the instance in question does not have a service account, this field should be left empty. If the wrong service account is provided, this operation will return a signed certificate that will not be accepted by the VM.
  - `sshPublicKey` string — Required. The SSH public key to sign.
  - `computeInstance` string — The Compute instance to sign the SSH public key for. Expected format: projects/{project}/zones/{zone}/instances/{numeric_instance_id}
  - `cloudRunResource` string — Optional. The Cloud Run resource to sign the SSH public key for. Expected formats: - `projects/{project}/locations/{location}/services/{service}` - `projects/{project}/locations/{location}/workerPools/{worker_pool}` - `projects/{project}/locations/{location}/jobs/{job}` - `projects/{project}/locations/{location}/instances/{instance}`
  - `appEngineInstance` string — The App Engine instance to sign the SSH public key for. Expected format: apps/{app}/services/{service}/versions/{version}/instances/{instance}

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/oslogin.md) · [All operations](https://skmtc.dev/google/apis/oslogin/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/oslogin/revisions/d37e38e2f1c7/schema)
