---
title: "Enrollment with public key"
method: POST
path: "/v1/ssh/certificaterequest"
tags: ["v1/ssh"]
---

# Enrollment with public key

`POST /v1/ssh/certificaterequest`

Enroll for a ssh certificate.

## Request body

- SshCertificateRequestRestRequest
  - `end_entity_profile` string — End Entity profile name
  - `certificate_profile` string — Certificate profile name
  - `certificate_authority` string — Certificate Authority (CA) name
  - `key_id` string — SSH Key Identifier
  - `comment` string — Comment
  - `public_key` string — Public Key
  - `principals` string[] — Valid principals
  - `critical_options` SshCriticalOptions — Critical options
    - `forceCommand` string — force-command
    - `sourceAddress` string — source-address
  - `additional_extensions` object
  - `username` string — Username
  - `password` string — Password
  - `not_before` string — Valid notBefore date
  - `not_after` string — Valid notAfter date

## Response `200`

Successful response

- SshCertificateRestResponse
  - `certificate` string, byte — Certificate
  - `response_format` string — Response format

## Changes

- **2025-03-11** `4045b1bab09f` — 1 breaking, 2 warning, 3 info
  - removed the success response with the status `201`
  - removed the request property `critical_options/force_command`
  - removed the request property `critical_options/source_address`
  - added the new optional request property `critical_options/forceCommand`
  - …2 more
- **2025-03-11** `37878df36b77` — 1 breaking, 2 warning, 3 info
  - removed the success response with the status `200`
  - removed the request property `critical_options/forceCommand`
  - removed the request property `critical_options/sourceAddress`
  - added the new optional request property `critical_options/force_command`
  - …2 more
- **2025-01-24** `d0f3affe7c3c` — 1 breaking, 2 warning, 3 info
  - removed the success response with the status `201`
  - removed the request property `critical_options/force_command`
  - removed the request property `critical_options/source_address`
  - added the new optional request property `critical_options/forceCommand`
  - …2 more
- **2024-07-05** `b6fc2ad168e5` — 1 breaking, 2 warning, 3 info
  - removed the success response with the status `200`
  - removed the request property `critical_options/forceCommand`
  - removed the request property `critical_options/sourceAddress`
  - added the new optional request property `critical_options/force_command`
  - …2 more

[Change history](https://skmtc.dev/keyfactor/apis/ejbca-rest-interface/changes/v1/ssh/certificaterequest/post.md)

---

[API](https://skmtc.dev/keyfactor/apis/ejbca-rest-interface.md) · [All operations](https://skmtc.dev/keyfactor/apis/ejbca-rest-interface/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keyfactor/ejbca-rest-interface/revisions/44f8798658e2/schema)
