Skip to content

yuexiaoliang/essh

Repository files navigation

essh

English | 简体中文

A lightweight CLI tool for managing SSH configurations and server connections.

Features

  • 🔐 Secure key encryption using age
  • 📦 Separate configuration from tool, enabling team collaboration
  • 🚀 Quick server connections without remembering IPs or key paths
  • 📝 Interactive server management

Installation

npx @yuexiaoliang1993/essh <command>

Or install globally:

npm install -g @yuexiaoliang1993/essh
essh <command>

Quick Start

1. Initialize Configuration

essh init

Enter your private config repository URL and password when prompted.

2. Decrypt Keys

essh setup

3. Connect to Server

# Interactive selection
essh connect

# Direct connection
essh connect <name>

Commands

Command Description
essh init Initialize configuration and clone private repository
essh setup Decrypt keys and configure SSH
essh connect [name] Connect to a server
essh list List all servers
essh add Add a new server (interactive)
essh remove [name] Remove a server
essh encrypt Re-encrypt and push to repository

Configuration Repository Structure

Your private repository should contain:

essh-config/
├── servers.json      # Server list
├── keys/
│   ├── server1.key.age   # Encrypted private keys
│   └── server2.key.age
└── .gitignore

servers.json Format

{
  "servers": [
    {
      "name": "home",
      "host": "192.168.1.100",
      "user": "admin",
      "port": 22,
      "key": "keys/home.key.age",
      "label": "Home Server"
    }
  ]
}

Environment Variables

# Provide password via environment variable (useful for scripts)
export ESSH_PASSWORD="your-password"
essh setup

License

MIT

About

A lightweight CLI tool for managing SSH configurations and server connections.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Generated from antfu/starter-ts