ttyd-remote-terminal-wsl2

from adaptationio/skrillz

No description

1 stars0 forksUpdated Jan 16, 2026
npx skills add https://github.com/adaptationio/skrillz --skill ttyd-remote-terminal-wsl2

SKILL.md

ttyd Remote Terminal for WSL2

Access your WSL2 terminal from any device (phone, tablet, remote computer) via secure web-based terminal using ttyd with ngrok, Cloudflare Tunnel, or Tailscale.

Overview

What This Skill Does:

  • Sets up ttyd (web-based terminal emulator) on WSL2
  • Configures secure authentication (prevents CVE-2021-34182)
  • Establishes encrypted tunnel (ngrok/Cloudflare/Tailscale)
  • Provides one-command start/stop/status operations
  • Automatically displays connection URL and credentials

When to Use This Skill:

  • Need to run commands on WSL2 while away from computer
  • Want terminal access from phone/tablet
  • Need quick remote access without full IDE
  • Occasional remote terminal access (vs permanent SSH setup)

When NOT to Use This Skill:

  • Need full IDE functionality → Use code-server-remote-ide-wsl2 instead
  • Need permanent production remote access → Consider dedicated SSH setup
  • Need to access non-WSL2 Linux → This is WSL2-specific

What You'll Get:

  • Lightweight terminal in browser (<50MB memory)
  • Secure HTTPS access with authentication
  • Auto-generated connection URLs
  • Simple start/stop commands
  • Works from any device with browser

Prerequisites

System Requirements:

  • WSL2 installed and working (Ubuntu 22.04 LTS recommended)
  • Windows 10 version 2004+ or Windows 11
  • 1GB+ free disk space
  • Internet connection

User Requirements:

  • Basic command line knowledge
  • Comfortable running bash scripts
  • Can create free account on tunnel service (ngrok/Cloudflare/Tailscale)

Not Required:

  • Advanced networking knowledge
  • systemd expertise
  • Security expertise (skill provides secure defaults)

Quick Start

Get remote terminal access in <10 minutes:

1. Install

cd ~/.claude/skills/ttyd-remote-terminal-wsl2/scripts
./install.sh

Follow prompts to:

  • Install ttyd
  • Choose tunnel service (ngrok recommended for beginners)
  • Install chosen tunnel tool

2. Configure Authentication

./configure-auth.sh

This generates a strong password and configures secure access.

3. Start Session

./ttyd-start.sh

This will:

  • Start ttyd with authentication
  • Start tunnel
  • Display connection URL and password

Copy the URL and open in any browser (phone, tablet, etc.)

4. Connect

Open the displayed URL in browser → Login with displayed password → You now have terminal access!

5. Stop Session (When Done)

./ttyd-stop.sh

Done! You now have working remote terminal access.

For detailed setup, troubleshooting, and advanced configuration, see the full workflow below.


Workflow

Step 1: One-Time Setup

This step installs ttyd and your chosen tunnel service. You only need to do this once.

1.1 Run the Installer

cd ~/.claude/skills/ttyd-remote-terminal-wsl2/scripts
./install.sh

The installer will:

  1. Check for existing installations (ttyd, tunnel tools)
  2. Install ttyd via apt (or manual if apt fails)
  3. Ask you to choose tunnel service:
    • ngrok (recommended for beginners): 1GB/month free, ephemeral URLs
    • Cloudflare Tunnel (recommended for production): Unlimited bandwidth, persistent URLs
    • Tailscale (recommended for private access): Private VPN, no public exposure
  4. Install chosen tunnel service
  5. Verify installations successful

1.2 Choose Your Tunnel Service

ngrok - Best for beginners:

  • ✅ Easiest to setup
  • ✅ Free tier: 1GB/month bandwidth
  • ⚠️ URLs change on each restart
  • ⚠️ Data limits (1GB/month free tier)

Cloudflare Tunnel - Best for production:

  • ✅ Unlimited bandwidth (free)
  • ✅ Persistent URLs (don't change)
  • ✅ Better performance
  • ⚠️ Slightly more complex setup

Tailscale - Best for private access:

  • ✅ Private network (not exposed to internet)
  • ✅ Unlimited bandwidth
  • ✅ No public URL (only accessible to your Tailscale network)
  • ⚠️ Requires Tailscale on connecting device

Recommendation: Start with ngrok (easiest), migrate to Cloudflare Tunnel if you need more bandwidth.

1.3 Get Tunnel Authentication Token

After choosing tunnel service, you'll need to create free account and get auth token:

For ngrok:

  1. Go to https://dashboard.ngrok.com/signup
  2. Sign up (free)
  3. Copy your authtoken from https://dashboard.ngrok.com/get-started/your-authtoken
  4. Run: ngrok config add-authtoken YOUR_TOKEN_HERE

For Cloudflare Tunnel:

  1. Go to https://dash.cloudflare.com/
  2. Sign up (free)
  3. Follow installer prompts (installer will guide you through cloudflared tunnel login)

For Tailscale:

  1. Go to https://login.tailscale.com/start
  2. Sign up (free)
  3. Run: sudo tailscale up
  4. Follow authentication link

1.4 Verify Installation

# Check ttyd installed
ttyd --version

# Check tunnel tool installed
ngrok version           # or: cloudflared --version  # or: tailscale version

Troubleshooting Installation:

  • If ttyd install fails, see [Installation Guide]

...

Read full content

Repository Stats

Stars1
Forks0