ZacharyZcR a4feb67c08 Add SSH key generation and deployment features (#234)
* Fix SSH key upload and credential editing issues

Fixed two major credential management issues:

1. Fix SSH key upload button not responding (Issue #232)
   - Error handling was silently swallowing exceptions
   - Added proper error propagation in axios functions
   - Improved error display to show specific error messages
   - Users now see actual error details instead of generic messages

2. Improve credential editing to show actual content
   - Both "Upload File" and "Paste Key" modes now display existing data
   - Upload mode: shows current key content in read-only preview area
   - Paste mode: shows editable key content in textarea
   - Smart input method switching preserves existing data
   - Enhanced button labels and status indicators

Key changes:
- Fixed handleApiError propagation in main-axios.ts credential functions
- Enhanced CredentialEditor.tsx with key content preview
- Improved error handling with console logging for debugging
- Better UX with clear status indicators and preserved data

These fixes resolve the "Add Credential button does nothing" issue
and provide full visibility of credential content during editing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add comprehensive SSH key management and validation features

- Add support for both private and public key storage
- Implement automatic SSH key type detection for all major formats (RSA, Ed25519, ECDSA, DSA)
- Add real-time key pair validation to verify private/public key correspondence
- Enhance credential editor UI with unified key input interface supporting upload/paste
- Improve file format support including extensionless files (id_rsa, id_ed25519, etc.)
- Add comprehensive fallback detection for OpenSSH format keys
- Implement debounced API calls for better UX during real-time validation
- Update database schema with backward compatibility for existing credentials
- Add API endpoints for key detection and pair validation
- Fix SSH2 module integration issues in TypeScript environment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Optimize credentials interface and add i18n improvements

- Merge upload/paste tabs into unified SSH key input interface
- Remove manual key type selection dropdown (rely on auto-detection)
- Add public key generation from private key functionality
- Complete key pair validation removal to fix errors
- Add missing translation keys for better internationalization
- Improve UX with streamlined credential editing workflow

* Implement direct SSH key generation with ssh2 native API

- Replace complex PEM-to-SSH conversion logic with ssh2's generateKeyPairSync
- Add three key generation buttons: Ed25519, ECDSA P-256, and RSA
- Generate keys directly in SSH format (ssh-ed25519, ecdsa-sha2-nistp256, ssh-rsa)
- Fix ECDSA parameter bug: use bits (256) instead of curve for ssh2 API
- Enhance generate-public-key endpoint with SSH format conversion
- Add comprehensive key type detection and parsing fallbacks
- Add internationalization support for key generation UI
- Simplify codebase from 300+ lines to ~80 lines of clean SSH generation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add passphrase support for SSH key generation

- Add optional passphrase input field in key generation container
- Implement AES-128-CBC encryption for protected private keys
- Auto-fill key password field when passphrase is provided
- Support passphrase protection for all key types (Ed25519, ECDSA, RSA)
- Enhance user experience with automatic form field population

* Implement SSH key deployment feature with credential resolution

- Add SSH key deployment endpoint supporting all authentication types
- Implement automatic credential resolution for credential-based hosts
- Add deployment UI with host selection and progress tracking
- Support password, key, and credential authentication methods
- Include deployment verification and error handling
- Add public key field to credential types and API responses
- Implement secure SSH connection handling with proper timeout

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: ZacharyZcR <zacharyzcr1984@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-14 21:29:32 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 15:17:13 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-08-12 12:04:47 +02:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-13 21:35:49 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-08-07 02:20:27 -05:00
2025-08-07 02:20:27 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 15:18:07 -05:00
2025-09-13 12:13:34 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00
2025-09-12 14:42:00 -05:00

Repo Stats

English English | 中文 中文

GitHub Repo stars GitHub forks GitHub Release Discord

Repo of the Day Achievement
Achieved on September 1st, 2025

Top Technologies

React Badge TypeScript Badge Node.js Badge Vite Badge Tailwind CSS Badge Docker Badge SQLite Badge Radix UI Badge


Termix Banner

If you would like, you can support the project here!
GitHub Sponsor

Overview

Termix Banner

Termix is an open-source, forever-free, self-hosted all-in-one server management platform. It provides a web-based solution for managing your servers and infrastructure through a single, intuitive interface. Termix offers SSH terminal access, SSH tunneling capabilities, and remote file editing, with many more tools to come.

Features

  • SSH Terminal Access - Full-featured terminal with split-screen support (up to 4 panels) and tab system
  • SSH Tunnel Management - Create and manage SSH tunnels with automatic reconnection and health monitoring
  • Remote File Editor - Edit files directly on remote servers with syntax highlighting, file management features ( uploading, removing, renaming, deleting files)
  • SSH Host Manager - Save, organize, and manage your SSH connections with tags and folders
  • Server Stats - View CPU, memory, and HDD usage on any SSH server
  • User Authentication - Secure user management with admin controls and OIDC and 2FA (TOTP) support
  • Modern UI - Clean desktop/mobile friendly (in progress) interface built with React, Tailwind CSS, and Shadcn
  • Languages - Built-in support for English and Chinese
  • Improved Platform Support - Now includes an installable Electron app (in progress) for desktop, with a dedicated mobile app also planned.

Planned Features

See Projects. If you are looking to contribute, see Contributing,

Installation

Visit the Termix Docs for more information on how to install Termix. Otherwise, view a sample docker-compose file here:

services:
  termix:
    image: ghcr.io/lukegus/termix:latest
    container_name: termix
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - termix-data:/app/data
    environment:
      PORT: "8080"

volumes:
  termix-data:
    driver: local

Pre-built binaries are now available for download, including a Windows installer/portable app and a Linux portable app ( built with Electron). See Docs for details. A native iOS/Android app is planned.

Support

If you need help with Termix, you can join the Discord server and visit the support channel. You can also open an issue or open a pull request on the GitHub repo.

Show-off

Termix Demo 1 Termix Demo 2

Termix Demo 3 Termix Demo 4 Termix Demo 5

License

Distributed under the Apache License Version 2.0. See LICENSE for more information.

Description
Termix is a web-based server management platform with SSH terminal, tunneling, and file editing capabilities.
Readme 462 MiB
2026-01-01 04:20:12 +00:00
Languages
TypeScript 98.4%
JavaScript 0.8%
CSS 0.3%
Shell 0.3%