Skip to content

Instantly share code, notes, and snippets.

@samirfor
Last active February 23, 2017 14:47
Show Gist options
  • Save samirfor/078856ba3b3f5a13a2abb276c4f5e183 to your computer and use it in GitHub Desktop.
Save samirfor/078856ba3b3f5a13a2abb276c4f5e183 to your computer and use it in GitHub Desktop.
Tunnel SSH connection through Tor network
#!/bin/bash
#
# install:
#
# echo "alias ssh-tor=/path/to/this/script/ssh-tor.sh" >> ~/.bash_aliases
# . ~/.bash_aliases
#
# usage:
# - start Tor Browser
# - make sure 9150 tcp port @ localhost is open
# - ssh-tor <normal ssh parameters>
exec ssh -o ProxyCommand="connect -5 -S 127.0.0.1:9150 %h %p" $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment