Skip to main content

Overview

SSH key endpoints allow you to generate, import, and manage SSH keys for connecting to remote Borg repositories. Borg UI uses a single system SSH key for all connections.

Get System SSH Key

Get the system SSH key (there can be only one). Endpoint: GET /api/ssh-keys/system-key Example Request:
Response:
boolean
Whether a system SSH key has been created
string
SSH key algorithm: rsa, ed25519, or ecdsa
string
SHA256 fingerprint of the public key
integer
Total number of SSH connections configured
integer
Number of connections with status “connected”

Generate System SSH Key

Generate a new system SSH key (one-time only). Endpoint: POST /api/ssh-keys/generate Admin Only: Yes
string
required
Name for the SSH key
string
default:"rsa"
Key algorithm: rsa, ed25519, or ecdsa
string
Optional description
Example Request:
Response:

Import System SSH Key

Import an existing SSH key from the filesystem. Endpoint: POST /api/ssh-keys/import Admin Only: Yes
string
required
Name for the SSH key
string
required
Path to private key file (e.g., /local/.ssh/id_ed25519)
string
Path to public key file. If not provided, will try {private_key_path}.pub
string
Optional description
Example Request:

Delete SSH Key

Delete the system SSH key. Endpoint: DELETE /api/ssh-keys/{key_id} Admin Only: Yes Example Request:

SSH Connections

List Connections

Get all SSH connections with storage information. Endpoint: GET /api/ssh-keys/connections Example Request:
Response:

Update Connection

Update SSH connection settings. Endpoint: PUT /api/ssh-keys/connections/{connection_id}
string
SSH host
string
SSH username
integer
SSH port
string
Default starting path for SSH browsing
string
Path prefix for SSH commands (e.g., /volume1 for Synology). SFTP uses path as-is, SSH prepends this prefix.
string
Logical mount point (e.g., /hetzner)
boolean
Use SFTP mode for ssh-copy-id (required by Hetzner, disable for Synology/older systems)
Example Request:

Test Connection

Test an existing SSH connection. Endpoint: POST /api/ssh-keys/connections/{connection_id}/test Example Request:
Response:

Refresh Storage Info

Refresh storage information for a connection. Endpoint: POST /api/ssh-keys/connections/{connection_id}/refresh-storage Example Request:
Response:

Redeploy SSH Key

Redeploy the system SSH key to an existing connection. Endpoint: POST /api/ssh-keys/connections/{connection_id}/redeploy
string
required
SSH password for authentication
Example Request:

Delete Connection

Delete an SSH connection. Endpoint: DELETE /api/ssh-keys/connections/{connection_id} Example Request:

Quick SSH Setup

Generate SSH key and deploy to remote server in one step. Endpoint: POST /api/ssh-keys/quick-setup Admin Only: Yes
string
required
Name for the SSH key
string
default:"rsa"
Key algorithm: rsa, ed25519, or ecdsa
string
Remote host for deployment
string
SSH username
integer
default:22
SSH port
string
SSH password for initial deployment
boolean
default:false
Generate key only, skip deployment
boolean
default:true
Use SFTP mode for ssh-copy-id (required by Hetzner, disable for Synology)
Example Request:
Response: