inicio mail me! sindicaci;ón

Connecting to redis via SSH tunneling

SSH tunneling is, of course, useful for a ton of services, but I happened to stumble upon it, when I wanted to connect to a remote redis server.

If you have a redis server running on [remotehost], you can easily connect
to it (given you have ssh access to it, of course) via:

ssh -L 9999:localhost:6379 [remoteuser]@[remotehost]

This will open a tunnel from the remote port 6379 (redis standard) to your local port 9999.

You can now use the redis on your local port 9999 like you would if it was running locally. Nice.

Rico Chen said,

Mai 24, 2012 @ 3:01 am

Great tip. Has been wondering to how to implement secure connection to redis server, now I have it. Thanks for sharing.

Sankalp said,

Juni 5, 2015 @ 4:27 pm

@Rico, your problem can also be solved using an nginx server with ssl on your redis instance, proxying for redis.

RSS feed for comments on this post · TrackBack URI

Schreibe einen Kommentar