npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

assh

v2.0.0

Published

Advanced SSH Manager - A modern CLI tool for managing SSH servers and tunnels

Readme

ASSH - Advanced SSH Manager

A modern, single-command SSH server management tool that replaces the legacy shell script system with a clean, organized approach.

Features

  • Server Management: Add, delete, and list SSH servers with ease
  • Multiple Connection Types: SSH, SOCKS5, Sing-box, and Xray support
  • Secure Authentication: SSH key generation and password authentication
  • Beautiful CLI: Colorful output and interactive prompts
  • Cross-platform: Works on macOS, Linux, and Windows with Bun

Installation

Global Installation (Recommended)

Install globally via npm:

npm install -g assh

Now you can use assh from anywhere:

assh ls
assh add
assh ssh myserver

Local Development

  1. Clone the repository:

    git clone <repository-url>
    cd assh
  2. Install dependencies:

    npm install
  3. Make the script executable:

    chmod +x sm.js
  4. Run locally:

    node sm.js ls

Usage

Server Management

Add a Server

assh add

This will prompt you for:

  • Server name (unique identifier)
  • IP address
  • Username (default: root)
  • SSH port (default: 22)
  • Authentication method (generate SSH key, use existing SSH key, or password)
  • SSH key path (if using existing key, default: ~/.ssh/id_rsa)

List Servers

assh ls

Shows a beautiful table with all your servers and their details.

Delete a Server

assh delete

Interactively select and delete a server (includes SSH key cleanup).

Ping a Server

assh ping <server-name>

Test connectivity to a server by pinging its IP address.

Connection Methods

SSH Connection

assh ssh <server-name>

Connects directly to the server via SSH.

SOCKS5 Proxy

assh socks5 <server-name>

Creates a SOCKS5 proxy tunnel. Options:

  • -p, --port <port>: Local port for SOCKS5 proxy (default: 8090)

Example:

assh socks5 myserver -p 8080

Sing-box (Shadowsocks)

assh sing-box <server-name>

Starts sing-box with TUN interface for system-wide VPN.

  • Requires sing-box to be installed
  • Requires sudo privileges for TUN interface
  • Prompts for shadowsocks password

Xray (VLESS)

assh xray <server-name>

Starts Xray with VLESS protocol.

  • Requires xray to be installed
  • Prompts for UUID
  • Provides both SOCKS5 (8090) and HTTP (8091) proxies

Configuration

Server configurations are stored in ~/.server-manager/servers.json. Each server includes:

  • IP address and port
  • Username
  • Authentication method (SSH key path or password)
  • Creation timestamp

Generated SSH keys are stored in ~/.server-manager/ directory with the naming pattern {server-name}_key.

Migration from Legacy System

The new system replaces these legacy scripts:

  • setup.shassh add
  • ssh.shassh ssh <server-name>
  • socks5.shassh socks5 <server-name>
  • sing.shassh sing-box <server-name>
  • xray.shassh xray <server-name>

Dependencies

Required for basic functionality:

  • node (JavaScript runtime, v16+ required)
  • ssh (SSH client)
  • ssh-keygen (SSH key generation)

Optional for advanced features:

  • sshpass (password authentication)
  • sing-box (for sing-box command)
  • xray (for xray command)

Examples

Complete workflow:

# Add a server
assh add

# List servers
assh ls

# Ping a server
assh ping myserver

# Connect via SSH
assh ssh myserver

# Create SOCKS5 proxy
assh socks5 myserver -p 8080

# Start sing-box VPN
assh sing-box myserver

# Start Xray proxy
assh xray myserver

Adding a server with SSH key:

assh add
# Follow prompts:
# - Server name: myserver
# - IP: 1.2.3.4
# - Username: root
# - Port: 22
# - Auth: Generate SSH Key (or Use existing SSH Key)
# - Key path: ~/.ssh/id_rsa (if using existing key)
# - Install key: Yes (if generating new key)
# - Password: [your-server-password] (if installing new key)

Security

  • SSH keys are automatically generated using RSA 2048-bit encryption
  • Keys are stored locally in the ./servers/ directory
  • Password authentication is supported but SSH keys are recommended
  • All SSH connections use StrictHostKeyChecking=no for convenience

Troubleshooting

Common Issues:

  1. Permission denied (publickey):

    • Make sure the SSH key was properly installed on the server
    • Check if the server allows SSH key authentication
  2. Connection refused:

    • Verify the server IP and port are correct
    • Check if the SSH service is running on the server
  3. sing-box/xray not found:

    • Install the required tools first
    • Make sure they're in your PATH

Getting Help:

assh --help
assh <command> --help

License

MIT License - feel free to modify and distribute.