mysql-ssh

JSON →
library 1.0.6 ·javascript
verified Jun 5, 2026

A lightweight Node.js library that establishes a MySQL connection through an SSH tunnel. Currently at version 1.0.6, it wraps ssh2 and mysql2 to provide a simple promise-based API for connecting to remote MySQL databases only accessible via SSH. Unlike manually managing SSH tunnels with separate libraries, mysql-ssh handles forwarding and cleanup automatically. Suitable for temporary connections, but users must call close() to avoid resource leaks. Low maintenance cadence.