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 🙏

© 2026 – Pkg Stats / Ryan Hefner

vps-harden

v1.2.0

Published

Secure your VPS in 2 minutes. Interactive CLI wizard for SSH hardening.

Readme

vps-harden

Secure your VPS in 2 minutes. One command, zero knowledge required.

npx vps-harden 194.68.0.12
[vps-harden]
  Target: 194.68.0.12

  ✓  1. Generate SSH key       ~/.ssh/vps_194_68_0_12_ed25519
  ✓  2. Copy key to server     [email protected]
  ✓  3. Create user            deploy (sudo)
  ✓  4. Change SSH port        22 → 2222
  ✓  5. Verify new port        [email protected]:2222 OK
  ✓  6. Close port 22          Port 22 closed
  ✓  7. Disable password auth  Password auth disabled
  ✓  8. Disable root login     Root login disabled
  ✓  9. Setup firewall         ufw on (2222, 80, 443)
  ✓ 10. Install fail2ban       fail2ban on port 2222

  ════════════════════════════════════════════════════
  ✓ Server hardened successfully!

  Connect with:
  ssh -i ~/.ssh/vps_194_68_0_12_ed25519 -p 2222 [email protected]

  Save this command. Port 22 is closed.
  ════════════════════════════════════════════════════

What it does

  1. Generates SSH key locally (ed25519, named after your server)
  2. Copies key to server via password auth
  3. Creates non-root user with passwordless sudo
  4. Changes SSH port (default: 2222)
  5. Verifies new port works before closing old one
  6. Closes port 22 — only after verification
  7. Disables password auth — key-only access
  8. Disables root login — use your new user
  9. Sets up UFW firewall — allows SSH, HTTP, HTTPS
  10. Installs fail2ban — brute-force protection

Safety first

The tool never locks you out:

  • Port 22 stays open until the new port is verified
  • Password auth stays on until key auth is confirmed
  • Every step has automatic rollback on failure
  • If anything fails, previous steps are undone in reverse order

Install

# Run instantly (no install)
npx vps-harden 194.68.0.12

# Or install globally
npm i -g vps-harden

Options

# Custom username and port
vps-harden 194.68.0.12 --username admin --port 3322

# Use existing SSH key
vps-harden 194.68.0.12 --key ~/.ssh/id_ed25519

# Preview without making changes
vps-harden 194.68.0.12 --dry-run

# Non-interactive (CI/scripts)
vps-harden 194.68.0.12 --password "rootpass" --username deploy

| Flag | Default | Description | |------|---------|-------------| | --password | prompt | Root password | | --username | deploy | New username | | --port | 2222 | New SSH port | | --key | auto-generate | Existing SSH key path | | --dry-run | false | Preview without changes |

Requirements

  • Node.js 18+
  • macOS or Linux (local machine)
  • Ubuntu/Debian VPS with root SSH access

After hardening

Your server is now protected with:

  • Non-standard SSH port (bots scan port 22)
  • Key-only authentication (no password brute-force)
  • Non-root user (limits damage if compromised)
  • UFW firewall (only SSH, HTTP, HTTPS open)
  • fail2ban (auto-bans repeated failed logins)

Why not a bash script?

| | vps-harden | Bash scripts | |---|---|---| | Install | npx (instant) | curl \| bash (scary) | | Runs from | Your machine | On the server | | SSH key gen | Automatic | Manual | | Safety | Verify before close | Hope for the best | | Rollback | Automatic | None | | UI | Interactive TUI | Raw output |

License

MIT