Repository navigation
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 keygetSSHKeys()— List all SSH keysgetSSHKey(id)— Get a single SSH key by IDupdateSSHKey(id, options)— Update an existing SSH keydeleteSSHKey(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.