0

I'm having a hard time understanding why torsocks/torify isn't working in this particular case.

 torify ssh user@remotemachine
 torsocks ssh user@remotemachine

When I do the following command when I get in my actual IP is printed:

echo $SSH_CLIENT
# [my actual IP + remote/local ports]

But if I do

ssh -o ProxyCommand='nc -x localhost:9050 %h %p' user@remotemachine # 9050 being the SOCKSPort

then I get the tor ip. What gives? What am I missing about how torify/torsocks and/or ssh works?

Contents of torsocks.conf:

TorAddress 127.0.0.1
TorPort 9050              # matches tor's SOCKSPort

edit: I should mention that I'm on MacOS and cannot torify/torsocks /usr/bin/ssh directly since /usr/bin is protected by Apple's System Integrity Protection so I copy it into /tmp/ssh first. I don't imagine that would change anything but don't know what I don't know so...

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

Try to use full path to your ssh copy like this:

torify /tmp/ssh user@remotemachine
torsocks /tmp/ssh user@remotemachine
  • I do that already. The code I put in my question was the simplest presentation of the problem (perhaps too simplified). I'm not at all familair with Apple's System Integrity Protection system but it prevents binaries in /usr/bin (like curl and ssh) from being used with torify/torsocks. – PistoletPierre Oct 21 '18 at 15:05
  • I don't know Apple at all but maybe /tmp is not the best choice for exeutables. Have you checked this: lorenzo.mile.si/…? – Tomek Oct 21 '18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.