---
title: "PATCH /api/v1/ssh/host-groups/{sshHostGroupId}"
method: PATCH
path: "/api/v1/ssh/host-groups/{sshHostGroupId}"
tags: ["SSH Host Groups"]
---

# PATCH /api/v1/ssh/host-groups/{sshHostGroupId}

`PATCH /api/v1/ssh/host-groups/{sshHostGroupId}`

Update SSH Host Group

## Path parameters

- `sshHostGroupId` string, required

## Request body

- object
  - `name` string — The name of the SSH host group to update to.
  - `loginMappings` object[] — A list of default login mappings to include on each host in the SSH host group. Each login mapping contains a login user and a list of corresponding allowed principals being usernames of users 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
  - `name` string, required
  - `loginMappings` object[], required
    - `loginUser` string, required
    - `allowedPrincipals` object, required
      - `usernames` string[]
      - `groups` string[]

## 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)
