1

I'm pretty confused by this. Took a little learning on my desktop but it was a completely different issue. I just got my Pi 3 setup, installed tor (sudo apt-get install tor) as well as everything tor-like given as packages.

I wanted to be able to SSH into my Pi and remotely administer some of my home computers. I thought this would be simple. I placed the following into my torrc file:

HiddenServiceDir /var/lib/tor/hidden_service/ssh/
HiddenServicePort 22 127.0.0.1:22

So in my logs I have:

<<date>> [warn] Error creating directory /var/lib/tor/hidden_service/ssh/: No such file or directory

So if I create these I get the same log entry. After sudo chown -R debian-tor:debian-tor /var/lib/tor/hidden_service I get the same entry. The permissions are drwxr-sr-x on the hidden_service directory. This was a problem before on my desktop (permissions to lax). I removed the sticky bit... no change... I changed permissions to drwx------ ... at that point tor seemed to not even work. No logs, no nothing. (Not sure if the missing log file was due to AvoidDiskWrites 1)

I'm not sure how to address this.

1

I feel a little silly about this but I found an answer. I'm not sure how it differed from my approach. This is taken from https://gk2.sk/running-ssh-on-a-raspberry-pi-as-a-hidden-service-with-tor/

export SERVICE_DIR=/var/lib/tor/sshd/
mkdir $SERVICE_DIR
chmod 700 $SERVICE_DIR
chown debian-tor.debian-tor $SERVICE_DIR

Checked with the following as per How to check if Tor is working and debug the problem on CLI?:

curl --socks5 localhost:9050 --socks5-hostname localhost:9050 -s https://check.torproject.org/ | cat | grep -m 1 Congratulations | xargs

I can only think my sticky bit manipulation caused a problem. I did change the period to colon in the chown command.

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.