Skip to content

v1.4

Latest

Choose a tag to compare

@TahierJerr TahierJerr released this 24 Apr 07:24
· 4 commits to main since this release

v1.4.0 – SSH Key Support

MODEX SDK now supports full SSH Key management via the Hetzner Cloud API.

✨ New Features

  • createSSHKey(options) — Create a new SSH key
  • getSSHKeys() — List all SSH keys
  • getSSHKey(id) — Get a single SSH key by ID
  • updateSSHKey(id, options) — Update an existing SSH key
  • deleteSSHKey(id) — Delete an SSH key

✍️ Usage Examples

Create SSH Key

const sshKey = await hcloud.security.createSSHKey({
  name: "modex-prod-key",
  public_key: "ssh-ed25519 AAAAC3N...",
  labels: { environment: "prod" }
})

List SSH Keys

const allKeys = await hcloud.security.listSSHKeys()

Get SSH Key by ID

const key = await hcloud.security.getSSHKey(12345)

Update SSH Key

const updated = await hcloud.security.updateSSHKey(12345, {
  name: "modex-updated-key",
  labels: { updated: "true" }
})

Delete SSH Key

await hcloud.security.deleteSSHKey(12345)

Let us know if you need support for importing private keys or attaching SSH keys to servers during provisioning.