Hostinger API icon

Hostinger API

Interact with the Hostinger API

Actions100

VPS Public Keys → Attach Public Key

AI-generated

Overview

This node operation attaches an existing public SSH key to a specified virtual private server (VPS) instance. It is useful for automating the process of adding SSH keys to VPS instances for secure access without manual intervention. For example, a user can attach a public key to a VPS to enable passwordless SSH login for deployment or management tasks.

Use Case Examples

  1. Attach a public SSH key to a VPS to enable secure, passwordless access for automated deployment scripts.
  2. Add a new public key to a VPS instance as part of a server setup workflow.

Properties

Name Meaning
Virtual Machine ID The unique identifier of the VPS instance to which the public key will be attached.
Request Body Raw JSON body for the POST request containing details of the public key attachment.

Output

JSON

  • response - The API response confirming the public key attachment status or details.

Dependencies

  • Requires an API key credential for Hostinger API authentication.

Troubleshooting

  • Ensure the Virtual Machine ID is correct and the VPS instance exists.
  • Verify the public key data in the request body is properly formatted JSON and valid.
  • Check API authentication credentials are correctly configured and have necessary permissions.
  • Common errors include 'Unsupported operation' if the operation name is incorrect, or HTTP errors if the VPS ID or public key is invalid.

Links

Discussion