Skip to content

Instantly share code, notes, and snippets.

@luszczynski
Created May 7, 2019 02:45
Show Gist options
  • Save luszczynski/ea2899db9ac04075e83928e5bb93e883 to your computer and use it in GitHub Desktop.
Save luszczynski/ea2899db9ac04075e83928e5bb93e883 to your computer and use it in GitHub Desktop.
SSH Tunnel

SSH Tunnel

ssh -L 12345:127.0.0.1:3306 root@my-remote-server -N

my-remote-server is running mysql on localhost and you can access it in your machine even though we have'nt expose port 3306.

mysql -h 127.0.0.1 -P 12345 -u myuser -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment