{"name":"tunn: Simplify SSH Tunnel Management with YAML Configuration","description":"tunn is a Go-based tool that simplifies the management of SSH tunnels. It allows users to define and launch multiple SSH tunnels using a single YAML configuration file, leveraging existing OpenSSH setups. This utility streamlines the process of connecting to remote services, offering features like parallel execution and daemon mode for background operation.","github":"https://github.com/strandnerd/tunn","url":"https://osrepos.com/repo/strandnerd-tunn","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/strandnerd-tunn","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/strandnerd-tunn.md","json":"https://osrepos.com/repo/strandnerd-tunn.json","topics":["golang","ssh","ssh-tunnel","tunneling","Go","system administration","networking","developer tools"],"keywords":["golang","ssh","ssh-tunnel","tunneling","Go","system administration","networking","developer tools"],"stars":null,"summary":"tunn is a Go-based tool that simplifies the management of SSH tunnels. It allows users to define and launch multiple SSH tunnels using a single YAML configuration file, leveraging existing OpenSSH setups. This utility streamlines the process of connecting to remote services, offering features like parallel execution and daemon mode for background operation.","content":"## Introduction\n`tunn` is an open-source tool written in Go, designed to simplify the creation and management of SSH tunnels. It acts as a developer-friendly wrapper around OpenSSH, enabling users to define and control multiple tunnels through a single, intuitive YAML configuration file. This utility is ideal for developers and system administrators who frequently need to establish secure connections to remote services, such as databases or APIs, without complex manual commands.\n\n## Installation\n`tunn` offers several straightforward installation methods to get you up and running quickly.\n\n### Quick Install\nbash\ncurl -sSL https://raw.githubusercontent.com/strandnerd/tunn/main/scripts/install.sh | sh\n\n\n### From Go Install\nEnsure you have Go 1.21 or higher installed.\nbash\ngo install github.com/strandnerd/tunn@latest\n\n\n### Build Locally\nbash\ngit clone https://github.com/strandnerd/tunn.git\ncd tunn\ngo build -o tunn\nsudo mv tunn /usr/local/bin/\n\n\n## Examples\n`tunn` makes managing SSH tunnels intuitive with its YAML configuration and simple command-line interface.\n\n### Configuration\nCreate a `~/.tunnrc` file in your home directory to define your tunnels:\nyaml\ntunnels:\n  api:\n    host: myserver          # SSH host from ~/.ssh/config\n    ports:\n      - 3000:3000           # local:remote port mapping\n      - 4000:4001\n    user: apiuser           # optional: SSH user\n    identity_file: ~/.ssh/id_rsa  # optional: SSH key\n\n  db:\n    host: database\n    ports:\n      - 3306:3306           # MySQL\n      - 5432:5432           # PostgreSQL\n    user: dbadmin           # optional: overrides SSH config\n\n  cache:\n    host: cacheserver\n    ports:\n      - 6379:6379           # Redis\n\nEnsure your SSH hosts are defined in `~/.ssh/config`, for example:\nssh\nHost myserver\n    HostName 192.168.1.100\n    User myuser\n    Port 22\n\n\n### Usage\n**Run All Tunnels:**\nbash\ntunn\n\n\n**Run Specific Tunnels:**\nbash\n# Single tunnel\ntunn api\n\n# Multiple tunnels\ntunn api db\n\n\n**Run Tunnels in the Background (Daemon Mode):**\nbash\ntunn --detach\n\nThis command detaches `tunn` to run as a background service.\n\n**Check Daemon Status:**\nbash\ntunn status\n\nThis reports the PID, mode, and port states for managed tunnels.\n\n**Stop the Daemon:**\nbash\ntunn stop\n\nThis command cleanly shuts down the `tunn` daemon.\n\n## Why Use `tunn`?\n`tunn` stands out for its simplicity and powerful features, making it an excellent choice for managing SSH tunnels:\n*   **Simple Configuration**: Define all your tunnels in a single, easy-to-read YAML file.\n*   **Leverages Existing SSH Setup**: Integrates seamlessly with your `~/.ssh/config` and existing SSH keys.\n*   **Parallel Execution**: All defined tunnels run concurrently, improving efficiency.\n*   **Daemon Mode**: Run tunnels as a background service, freeing up your terminal.\n*   **Fine-Grained Control**: Run all tunnels or selectively launch specific ones by name.\n*   **Go Module**: A lean Go module with minimal dependencies, ensuring clean and portable builds.\n\n## Links\nFor more detailed information, contributions, or to report issues, visit the official GitHub repository:\n*   [GitHub Repository](https://github.com/strandnerd/tunn){:target=\"_blank\"}","metrics":{"detailViews":4,"githubClicks":6},"dates":{"published":null,"modified":"2026-03-07T09:45:58.000Z"}}