Overview
Rexec’s SSH features:- Store SSH public keys for container access
- Manage remote hosts (jump hosts, production servers)
- Auto-sync keys to containers
- Support for ed25519, rsa, ecdsa key types
Private keys are never stored. Rexec only stores public keys for authorized_keys injection.
SSH keys
List SSH keys
GET/api/ssh/keys
curl
Key ID
Key name/label
Public key content (ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256)
SHA256 fingerprint
Key algorithm (ed25519, rsa, ecdsa)
ISO timestamp
Last authentication timestamp
Add SSH key
POST/api/ssh/keys
Key name (e.g., “MacBook Pro”, “Work Laptop”)
Public key in OpenSSH format
curl
Delete SSH key
DELETE/api/ssh/keys/:id
curl
Deleting a key removes it from all containers where it was synced.
Container SSH access
Get SSH connection info
GET/api/ssh/connect/:containerId
Get SSH connection details for a container.
curl
SSH host (Rexec gateway IP)
SSH port (usually 2222)
Container username (usually
root)Target container ID
Ready-to-use SSH command
Sync SSH keys to container
POST/api/ssh/sync/:containerId
Sync all user SSH keys to container’s authorized_keys.
curl
Check SSH server status
GET/api/ssh/status/:containerId
Check if SSH server is installed and running.
curl
Whether SSH server is installed
Whether SSH daemon is running
Container’s internal SSH port
Install SSH server
POST/api/ssh/install/:containerId
Install and configure SSH server in container.
curl
Installation detects OS (apt, yum, apk) and installs openssh-server automatically.
Remote hosts
Manage remote hosts for SSH access through Rexec (jump host functionality).List remote hosts
GET/api/ssh/hosts
curl
Host ID
Host name
IP address or domain
SSH port (default: 22)
SSH username
Path to private key on Rexec server
Add remote host
POST/api/ssh/hosts
Friendly name for host
IP address or domain
SSH username
SSH port (default: 22)
Path to private key (must be uploaded separately)
curl
Delete remote host
DELETE/api/ssh/hosts/:id
curl
SSH config integration
Generate SSH config for local client:Key management best practices
- Use ed25519 keys (smaller, faster, more secure)
- Rotate keys every 6-12 months
- Use different keys for different security zones
- Never share private keys
- Delete keys when devices are decommissioned
Related
- SSH Access Feature - SSH gateway overview
- Authentication - API authentication
- Containers - Container management