curl --request PATCH \
--url https://us.infisical.com/api/v1/ssh/hosts/{sshHostId} \
--header 'Content-Type: application/json' \
--data '{
"hostname": "<string>",
"alias": "<string>",
"userCertTtl": "<string>",
"hostCertTtl": "<string>",
"loginMappings": [
{
"loginUser": "<string>",
"allowedPrincipals": {
"usernames": [
"<string>"
],
"groups": [
"<string>"
]
}
}
]
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "<string>",
"hostname": "<string>",
"alias": "<string>",
"userCertTtl": "<string>",
"hostCertTtl": "<string>",
"userSshCaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostSshCaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loginMappings": [
{
"loginUser": "<string>",
"allowedPrincipals": {
"usernames": [
"<string>"
],
"groups": [
"<string>"
]
},
"source": "host"
}
]
}
Update SSH Host
curl --request PATCH \
--url https://us.infisical.com/api/v1/ssh/hosts/{sshHostId} \
--header 'Content-Type: application/json' \
--data '{
"hostname": "<string>",
"alias": "<string>",
"userCertTtl": "<string>",
"hostCertTtl": "<string>",
"loginMappings": [
{
"loginUser": "<string>",
"allowedPrincipals": {
"usernames": [
"<string>"
],
"groups": [
"<string>"
]
}
}
]
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "<string>",
"hostname": "<string>",
"alias": "<string>",
"userCertTtl": "<string>",
"hostCertTtl": "<string>",
"userSshCaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostSshCaId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loginMappings": [
{
"loginUser": "<string>",
"allowedPrincipals": {
"usernames": [
"<string>"
],
"groups": [
"<string>"
]
},
"source": "host"
}
]
}
The ID of the SSH host to update.
Default Response
The response is of type object
.
Was this page helpful?