Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got a redis server running on my remote machine. It's currently set only to bind

I can ssh into the machine with ssh -D 9999 mydomainwhatever.net to open a SOCKS proxy and then configure my Operating systems's network preferences to use that proxy for all connections.

Is is possible to then connect to the redis server running on the remote machine with a redis-cli running on my local machine? I'm attempting to use redis-py as the client actually but it's not relevant I think.

I'd prefer not to expose redis to the internet.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In this answer I assume that default redis port (6379) is used. You might create a tunnel via ssh so localhost->6379 will point to mydomainwhatever.net:6379 using this command:

ssh -L 6379:localhost:6379 user@mydomainwhatever.net

Then you might connect to localhost:6379 using redis client.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.