redis-ssh v1.0.0 establishes a Redis connection through an SSH tunnel using the ssh2 and redis packages. It wraps the SSH tunnel lifecycle and provides a simple connect() function that returns a Redis client and a close() method. This package simplifies connecting to a remote Redis instance behind a firewall without manual SSH port forwarding. Unlike full VPN solutions, it is lightweight and specific to Redis. The release cadence is ad-hoc with no recent updates; it is stable for its limited use case but not actively maintained.
npm install redis-sshNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a Redis server through an SSH tunnel, sets a key, then closes the tunnel.
Always call close() after finishing Redis operations, preferably in a finally block.
Refer to ssh2 and redis documentation for correct parameters.
Destructure the returned object to access client and close.
Consider using ioredis with manual SSH tunneling via ssh2, or switch to a more maintained library.
Verify sshConfig credentials and that Redis is listening on the remote host and port.
Use const Redis = require('redis-ssh'); then Redis.connect().Check SSH private key path, permissions, username, and host.