💾 Archived View for jagtalon.net › tor-ssh.gmi captured on 2024-02-05 at 09:31:21. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
The iMac showing the bandwidth graph of Tor
One of the great things about onion services is they make it easy to create peer-to-peer connections because they're able to do NAT (Network Address Translation) traversal automatically. That means I'm able to connect to a computer at home even when I'm out and about!
To do that, add these lines in `/etc/tor/torrc`:
HiddenServiceDir /var/tor/hidden_service/ HiddenServicePort 22 127.0.0.1:22
Then restart Tor. On OpenBSD, that's: `doas rcctl restart tor`. That's it! You'll find the onion address in `/var/tor/hidden_service/hostname`.
From your other computer, you can run `torsocks ssh user@youronionaddress.onion` to login. You can even run other commands like `torsocks rsync files/ user@youronionaddress.onion:files/` if you want to transfer files.