---
title: "PATCH /api/v1/ssh/hosts/{sshHostId}"
method: PATCH
path: "/api/v1/ssh/hosts/{sshHostId}"
tags: ["SSH Hosts"]
---

# PATCH /api/v1/ssh/hosts/{sshHostId}

`PATCH /api/v1/ssh/hosts/{sshHostId}`

Update SSH Host

## Path parameters

- `sshHostId` string, required

## Request body

- object
  - `hostname` string — The hostname of the SSH host to update to.
  - `alias` string — The alias for the SSH host to update to.
  - `userCertTtl` string — The time to live for user certificates issued under this host to update to.
  - `hostCertTtl` string — The time to live for host certificates issued under this host to update to.
  - `loginMappings` object[] — A list of login mappings for the SSH host. Each login mapping contains a login user and a list of corresponding allowed principals being usernames of users or groups slugs in the Infisical SSH project.
    - `loginUser` string, required
    - `allowedPrincipals` object, required
      - `usernames` string[]
      - `groups` string[]

## Response `200`

Default Response

- object
  - `id` string, uuid, required
  - `projectId` string, required
  - `hostname` string, required
  - `alias` string, nullable
  - `userCertTtl` string, required
  - `hostCertTtl` string, required
  - `userSshCaId` string, uuid, required
  - `hostSshCaId` string, uuid, required
  - `loginMappings` object[], required
    - `loginUser` string, required
    - `allowedPrincipals` object, required
      - `usernames` string[]
      - `groups` string[]
    - `source` 'host' | 'hostGroup', required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.dev/infisical/apis/infisical-api.md) · [All operations](https://skmtc.dev/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infisical/infisical-api/revisions/53fe4d80973f/schema)
