mirror of
https://github.com/hanzoai/kms.git
synced 2026-10-17 11:18:16 +00:00
- Fix 381 files where branding script corrupted variable names (e.g. isHanzo KMSTemplate -> isKmsTemplate) - Rebrand from "Hanzo KMS" to just "KMS" for white-label support (allows Lux KMS, Hanzo KMS, etc. via configuration) - 856 files, purely string replacements, no logic changes
114 lines
4.4 KiB
Plaintext
114 lines
4.4 KiB
Plaintext
---
|
|
title: "SSH"
|
|
description: "Learn how to configure an SSH Connection for KMS."
|
|
---
|
|
|
|
KMS supports both SSH key authentication and username-password authentication.
|
|
|
|
## Prerequisites
|
|
|
|
You will need the following information to establish an SSH connection:
|
|
|
|
- **Username** - The username with the required permissions to connect (e.g., `root`)
|
|
- **Host** - The hostname or IP address of the machine
|
|
- **Password/Private Key** - The password or SSH private key for the user
|
|
|
|
|
|
## Setup SSH Connection in KMS
|
|
|
|
<Tabs>
|
|
<Tab title="KMS UI">
|
|
<Steps>
|
|
<Step title="Navigate to App Connections">
|
|
Navigate to the **App Connections** tab in your Organization Settings.
|
|

|
|
</Step>
|
|
<Step title="Select SSH Connection">
|
|
Click the **+ Add Connection** button and select **SSH Connection** from the available options.
|
|
|
|

|
|
</Step>
|
|
<Step title="Fill out the SSH Connection Modal">
|
|
<Tabs>
|
|
<Tab title="Username Password">
|
|
Complete the SSH Connection form by entering:
|
|
- A descriptive name for the connection
|
|
- An optional description for future reference
|
|
- The SSH host (hostname or IP address)
|
|
- The SSH port (default is 22)
|
|
- The username for your machine
|
|
- The SSH password for the user
|
|
|
|

|
|
</Tab>
|
|
<Tab title="SSH Key">
|
|
Complete the SSH Connection form by entering:
|
|
- A descriptive name for the connection
|
|
- An optional description for future reference
|
|
- The SSH host (hostname or IP address)
|
|
- The SSH port (default is 22)
|
|
- The username for your machine
|
|
- The SSH private key
|
|
- An optional passphrase if the private key is protected
|
|
|
|

|
|
</Tab>
|
|
</Tabs>
|
|
</Step>
|
|
<Step title="Connection Created">
|
|
After clicking Create, your **SSH Connection** is established and ready to use with your KMS project.
|
|
|
|

|
|
</Step>
|
|
</Steps>
|
|
</Tab>
|
|
<Tab title="API">
|
|
To create an SSH Connection, make an API request to the [Create SSH
|
|
Connection](/api-reference/endpoints/app-connections/ssh/create) API endpoint.
|
|
|
|
### Sample request
|
|
|
|
```bash Request
|
|
curl --request POST \
|
|
--url https://kms.hanzo.ai/api/v1/app-connections/ssh \
|
|
--header 'Content-Type: application/json' \
|
|
--data '{
|
|
"name": "my-ssh-connection",
|
|
"method": "ssh-key",
|
|
"projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
|
|
"credentials": {
|
|
"host": "[ssh host]",
|
|
"port": 22,
|
|
"privateKey": "[SSH Private Key]",
|
|
"username": "root"
|
|
}
|
|
}'
|
|
```
|
|
|
|
### Sample response
|
|
|
|
```bash Response
|
|
{
|
|
"appConnection": {
|
|
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"name": "my-ssh-connection",
|
|
"projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
|
|
"version": 1,
|
|
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
|
"createdAt": "2023-11-07T05:31:56Z",
|
|
"updatedAt": "2023-11-07T05:31:56Z",
|
|
"app": "ssh",
|
|
"method": "ssh-key",
|
|
"credentials": {
|
|
"host": "[ssh host]",
|
|
"port": 22,
|
|
"privateKey": "[SSH Private Key]",
|
|
"username": "root"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
</Tab>
|
|
</Tabs>
|
|
|