Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Created December 28, 2009 05:56
Show Gist options
  • Save pcdinh/264549 to your computer and use it in GitHub Desktop.
Save pcdinh/264549 to your computer and use it in GitHub Desktop.
ssh -f remote_user@remote_server -L 6378:remote_server:6379 -N
# -f -- backgrounds ssh right before execution of the command
# -L -- Forwards localhost:6378 to remote_server:6379 (encrypted and authenticated)
# -N -- Don't execute a remote command, just forward the port
# Start a redis server on remote_server on port 6379:
redis-server
# on the local machine telnet localhost 6378
telnet localhost 6378
# You are now securely connected to redis on the remote server by connecting to your local port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment