Skip to content

Instantly share code, notes, and snippets.

@gmolveau
Last active November 9, 2017 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmolveau/8c0e1496137830be463a2fbff40c8eef to your computer and use it in GitHub Desktop.
Save gmolveau/8c0e1496137830be463a2fbff40c8eef to your computer and use it in GitHub Desktop.
[SSH client through Tor proxy with docker] launch a SSH session through Tor proxy with Docker #docker #ssh #tor
  • First run the Tor proxy docker :
docker run -d --restart always -v /etc/localtime:/etc/localtime:ro -p 127.0.0.1:9050:9050 --name torproxy jess/tor-proxy
  • Then launch your ssh-client docker :
docker run --rm --link torproxy:torproxy -v $HOME/.ssh/id_rsa:/id_rsa:ro -it okampfer/ssh-client -o ProxyCommand="nc -x torproxy:9050 %h %p" -i /id_rsa <user>@<server> -p 22

-> Tada.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment