20100811

tor ssh client config

SSH needs to be told to use Tor for connectivity, and for DNS lookups (so it knows how to find a .onion addresses.) The connect proxy forwarder can do this really easily. It's available in macports, FreeBSD ports, and Ubuntu's package management. You can also compile it yourself, it doesn't have any funky dependencies.
After it's installed, add this configuration chunk into your ~/.ssh/config file:
Host *.onion
    PubKeyAuthentication no
    VisualHostKey yes
    Compression yes
    ForwardAgent no
    ForwardX11 no
    PreferredAuthentications password
    ProxyCommand /path/to/connect -S 127.0.0.1:9050 %h %p
... and that's it. You'll be able to ssh as normal, and if you're connected to Tor, ssh will know what to do with hosts that end in .onion. Make sure that if you're connecting to a .onion host, that you explicitly pass your username -- otherwise, ssh defaults to using the username of the currently logged in user.
-- map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_} unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

No comments:

Post a Comment