import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.sshKeys.update({
sshKeyId: "ssh_GnzRD5xAqM5yw",
requestBody: {
data: {
id: "ssh_GnzRD5xAqM5yw",
type: "ssh_keys",
attributes: {
tags: [
"tag_JLA906BzyKHLyVJbJr8NH3QQbev",
"tag_Yy7PJ68y22FoQyBppnW7FjNGX1k",
],
},
},
},
});
console.log(result);
}
run();{
"data": {
"id": "ssh_GnzRD5xAqM5yw",
"type": "ssh_keys",
"attributes": {
"tags": [
{
"id": "tag_JLA906BzyKHLyVJbJr8NH3QQbev",
"name": "Elfstan Fairbairn",
"description": "Culpa fuga asperiores et.",
"color": "#3fd53f"
},
{
"id": "tag_Yy7PJ68y22FoQyBppnW7FjNGX1k",
"name": "Lindir",
"description": "Et voluptas sequi rerum.",
"color": "#172717"
}
],
"name": "bradtke.example",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZzuE/2myrBWwvs5ayKE/p37nbhUWBpVfKjFA/6meaIFj3pKHv7lK3rZxOz/QnrUPsTS04kXVwvOG1Ms+ZQk7irHNzSWksKIFK8mPZWf9T6Pb2DbUduela1jUnmelVKPoiF6lUVnA8IayHbeRD5kaGS1zr35WzstNhUPXoab6QI9NSakvxUxciGitJ/nMWSJlfV3y48OQ1NE9iuqoSWomWc8/NEjk5x2uJcte2ZA336hjYHQxo9+DYhLq9jRcxw3RrzqkWFDuVT4SW82x5ERIZYUKZmywOwk8gCePNaUkzRU4G6qwADfpBovbicZ4+9WBpZsJ7vj8OqM35TdFS7ZjJ",
"fingerprint": "52:c8:05:f4:9b:f0:42:17:40:07:64:0d:33:12:9a:47",
"created_at": "2026-01-14T15:57:06+00:00",
"updated_at": "2026-01-14T15:57:06+00:00",
"project": {},
"user": {
"id": "user_yReEYZlaagFl4YmjMZ6GCpvwJJJb",
"first_name": "Gale",
"last_name": "Brown",
"email": "[email protected]",
"created_at": "2025-02-17T00:00:00.000Z",
"updated_at": "2025-05-31T00:00:00.000Z",
"role": {
"id": "role_bBeWeR8mBLuyLVoQwzNWcng2ekv",
"name": "owner",
"created_at": "2025-11-16T00:00:00.000Z",
"updated_at": "2026-06-05T00:00:00.000Z"
}
}
}
},
"meta": {}
}Allows you update SSH Key in a project. These keys can be used to access servers after deploy and reinstall actions.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.sshKeys.update({
sshKeyId: "ssh_GnzRD5xAqM5yw",
requestBody: {
data: {
id: "ssh_GnzRD5xAqM5yw",
type: "ssh_keys",
attributes: {
tags: [
"tag_JLA906BzyKHLyVJbJr8NH3QQbev",
"tag_Yy7PJ68y22FoQyBppnW7FjNGX1k",
],
},
},
},
});
console.log(result);
}
run();{
"data": {
"id": "ssh_GnzRD5xAqM5yw",
"type": "ssh_keys",
"attributes": {
"tags": [
{
"id": "tag_JLA906BzyKHLyVJbJr8NH3QQbev",
"name": "Elfstan Fairbairn",
"description": "Culpa fuga asperiores et.",
"color": "#3fd53f"
},
{
"id": "tag_Yy7PJ68y22FoQyBppnW7FjNGX1k",
"name": "Lindir",
"description": "Et voluptas sequi rerum.",
"color": "#172717"
}
],
"name": "bradtke.example",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZzuE/2myrBWwvs5ayKE/p37nbhUWBpVfKjFA/6meaIFj3pKHv7lK3rZxOz/QnrUPsTS04kXVwvOG1Ms+ZQk7irHNzSWksKIFK8mPZWf9T6Pb2DbUduela1jUnmelVKPoiF6lUVnA8IayHbeRD5kaGS1zr35WzstNhUPXoab6QI9NSakvxUxciGitJ/nMWSJlfV3y48OQ1NE9iuqoSWomWc8/NEjk5x2uJcte2ZA336hjYHQxo9+DYhLq9jRcxw3RrzqkWFDuVT4SW82x5ERIZYUKZmywOwk8gCePNaUkzRU4G6qwADfpBovbicZ4+9WBpZsJ7vj8OqM35TdFS7ZjJ",
"fingerprint": "52:c8:05:f4:9b:f0:42:17:40:07:64:0d:33:12:9a:47",
"created_at": "2026-01-14T15:57:06+00:00",
"updated_at": "2026-01-14T15:57:06+00:00",
"project": {},
"user": {
"id": "user_yReEYZlaagFl4YmjMZ6GCpvwJJJb",
"first_name": "Gale",
"last_name": "Brown",
"email": "[email protected]",
"created_at": "2025-02-17T00:00:00.000Z",
"updated_at": "2025-05-31T00:00:00.000Z",
"role": {
"id": "role_bBeWeR8mBLuyLVoQwzNWcng2ekv",
"name": "owner",
"created_at": "2025-11-16T00:00:00.000Z",
"updated_at": "2026-06-05T00:00:00.000Z"
}
}
}
},
"meta": {}
}Was this page helpful?