<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gangplank.group/mediawiki/index.php?action=history&amp;feed=atom&amp;title=SSH_over_Tor</id>
	<title>SSH over Tor - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://gangplank.group/mediawiki/index.php?action=history&amp;feed=atom&amp;title=SSH_over_Tor"/>
	<link rel="alternate" type="text/html" href="https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;action=history"/>
	<updated>2026-04-29T00:48:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;diff=168&amp;oldid=prev</id>
		<title>HR: /* Linux (Ubuntu) */</title>
		<link rel="alternate" type="text/html" href="https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;diff=168&amp;oldid=prev"/>
		<updated>2021-03-22T01:00:41Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Linux (Ubuntu)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:00, 22 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Linux (Ubuntu) ====&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Linux (Ubuntu) ====&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;&#039;&#039;Caveat:&#039;&#039;&#039; all commands are entered on the command-line interface.&#039;&#039;&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===== Install tor =====&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===== Install tor =====&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key gangplank_wiki:diff:wikidiff2:1.12:old-167:rev-168:1.14.1 --&gt;
&lt;/table&gt;</summary>
		<author><name>HR</name></author>
	</entry>
	<entry>
		<id>https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;diff=167&amp;oldid=prev</id>
		<title>HR at 17:49, 21 March 2021</title>
		<link rel="alternate" type="text/html" href="https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;diff=167&amp;oldid=prev"/>
		<updated>2021-03-21T17:49:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:49, 21 March 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 97:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 97:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Forwarding of local ports ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Forwarding of local ports ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suppose there is also a LanBox &amp;lt;ref&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;[https://www.lanbox.com&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;]&amp;lt;/ref&amp;gt; in the remote network. We can connect to the LanBox via our Tor-Raspi with our locally installed LCedit+ (LanBox&#039;s software suite) by forwarding a few ports towards the IP of the LanBox. Given the LanBox has the IP address 10.0.0.3, then the ssh command to forward the necessary ports is:&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suppose there is also a LanBox &amp;lt;ref&amp;gt;[https://www.lanbox.com&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; https://www.lanbox.com&lt;/ins&gt;]&amp;lt;/ref&amp;gt; in the remote network. We can connect to the LanBox via our Tor-Raspi with our locally installed LCedit+ (LanBox&#039;s software suite) by forwarding a few ports towards the IP of the LanBox. Given the LanBox has the IP address 10.0.0.3, then the ssh command to forward the necessary ports is:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; ssh -o &quot;ProxyCommand socat STDIO SOCKS4A:localhost:%h:%p,socksport=9050&quot; -o PreferredAuthentications=password -o PubkeyAuthentication=no -L 4776:10.0.0.3:777 -L 4777:10.0.0.3:4777 -L 6454:10.0.0.3:6454 pi@[onion address]&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; ssh -o &quot;ProxyCommand socat STDIO SOCKS4A:localhost:%h:%p,socksport=9050&quot; -o PreferredAuthentications=password -o PubkeyAuthentication=no -L 4776:10.0.0.3:777 -L 4777:10.0.0.3:4777 -L 6454:10.0.0.3:6454 pi@[onion address]&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key gangplank_wiki:diff:wikidiff2:1.12:old-165:rev-167:1.14.1 --&gt;
&lt;/table&gt;</summary>
		<author><name>HR</name></author>
	</entry>
	<entry>
		<id>https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;diff=165&amp;oldid=prev</id>
		<title>HR: Created page with &quot;Create a SSH &lt;ref&gt;wikipedia:SSH_(Secure_Shell)&lt;/ref&gt; connection via the Tor &lt;ref&gt;wikipedia:Tor_(anonymity_network)&lt;/ref&gt; network.  == Background == Imagine you want to...&quot;</title>
		<link rel="alternate" type="text/html" href="https://gangplank.group/mediawiki/index.php?title=SSH_over_Tor&amp;diff=165&amp;oldid=prev"/>
		<updated>2021-03-21T11:49:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Create a SSH &amp;lt;ref&amp;gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/SSH_(Secure_Shell)&quot; class=&quot;extiw&quot; title=&quot;wikipedia:SSH (Secure Shell)&quot;&gt;wikipedia:SSH_(Secure_Shell)&lt;/a&gt;&amp;lt;/ref&amp;gt; connection via the Tor &amp;lt;ref&amp;gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Tor_(anonymity_network)&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Tor (anonymity network)&quot;&gt;wikipedia:Tor_(anonymity_network)&lt;/a&gt;&amp;lt;/ref&amp;gt; network.  == Background == Imagine you want to...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Create a SSH &amp;lt;ref&amp;gt;[[wikipedia:SSH_(Secure_Shell)]]&amp;lt;/ref&amp;gt; connection via the Tor &amp;lt;ref&amp;gt;[[wikipedia:Tor_(anonymity_network)]]&amp;lt;/ref&amp;gt; network.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Imagine you want to access a remote computer which is connected to a local network with Internet access. The remote computer has a local IP address which is not accessible from outside the local network unless the access point, where the remote computer is connected to, explicitly forwards the specific port(s) for the incoming connections to the computer.&lt;br /&gt;
&lt;br /&gt;
In the case you&amp;#039;re at home and have access to the configuration of your access point that&amp;#039;s not so hard to archive. But if the computer is located somewhere else e.g. as part of an installation in some venue, then forwarding the port can become tricky, e.g. because of burocracy. Given you are in such a tricky situation, then putting a little computer (like a Raspberry Pi) with Tor to the mix might be a workaround to consider.&lt;br /&gt;
&lt;br /&gt;
The Tor feature we want to use here is called onion service &amp;lt;ref&amp;gt;[[wikipedia:Tor_(anonymity_network)#Onion_services]]&amp;lt;/ref&amp;gt;. Onion services can be any networked service you would run on a regular server, like SSH or HTTP(S), but are accessible via the Tor network. Onion services have the nice property that you can directly connect to the computer running that service, even if the computer is connected to a local network (with Internet access) and has no public IP address and without the necessity to forward any ports from the access point to the computer. &lt;br /&gt;
&lt;br /&gt;
In addition to that we can use this Tor enabled computer to connect to other devices in the remote local network.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
For our example setup we use: &lt;br /&gt;
* Raspberry Pi &amp;lt;ref&amp;gt;[[wikipedia:Raspberry_Pi]]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Your computer&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Caveat:&amp;#039;&amp;#039;&amp;#039; all commands are entered on the command-line interface &amp;lt;ref&amp;gt;[[wikipedia:Command-line_interface]]&amp;lt;/ref&amp;gt;.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== Install &amp;amp; configure Tor ====&lt;br /&gt;
&lt;br /&gt;
 sudo apt install tor&lt;br /&gt;
&lt;br /&gt;
Now we configure the SSH onion service by editing &amp;#039;&amp;#039;/etc/tor/torrc&amp;#039;&amp;#039; . In the &amp;#039;&amp;#039;location-hidden services&amp;#039;&amp;#039; section add:&lt;br /&gt;
&lt;br /&gt;
 HiddenServiceDir /var/lib/tor/ssh_onion_service/&lt;br /&gt;
 HiddenServicePort 22 127.0.0.1:22&lt;br /&gt;
&lt;br /&gt;
Then we restart Tor:&lt;br /&gt;
 &lt;br /&gt;
 sudo systemctl restart tor.service&lt;br /&gt;
&lt;br /&gt;
==== Install &amp;amp; configure SSH server ====&lt;br /&gt;
&lt;br /&gt;
 sudo apt install openssh-server&lt;br /&gt;
 sudo systemctl enable ssh.service&lt;br /&gt;
&lt;br /&gt;
The Raspberry is now ready to receive SSH connections via the Tor network.&lt;br /&gt;
&lt;br /&gt;
==== Onion address ====&lt;br /&gt;
&lt;br /&gt;
Later we&amp;#039;ll need the Raspberry&amp;#039;s .onion address to connect to our onion service. To display it just type:&lt;br /&gt;
&lt;br /&gt;
 sudo cat /var/lib/tor/ssh_onion_service/hostname&lt;br /&gt;
&lt;br /&gt;
=== Your Computer ===&lt;br /&gt;
&lt;br /&gt;
==== Linux (Ubuntu) ====&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Caveat:&amp;#039;&amp;#039;&amp;#039; all commands are entered on the command-line interface.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===== Install tor =====&lt;br /&gt;
&lt;br /&gt;
 sudo apt install tor&lt;br /&gt;
&lt;br /&gt;
===== Install socat =====&lt;br /&gt;
&lt;br /&gt;
We&amp;#039;ll need socat to connect our SSH session to the Tor network.&lt;br /&gt;
&lt;br /&gt;
 sudo apt install socat&lt;br /&gt;
&lt;br /&gt;
===== Connect to Raspberry =====&lt;br /&gt;
&lt;br /&gt;
Now we&amp;#039;re ready to connect our computer to the Raspberry via the Tor network. When invoking SSH we have basically two options:&lt;br /&gt;
&lt;br /&gt;
# write all required parameters in the ssh command, or&lt;br /&gt;
# have the required parameters stored in a configuration file for easier invokation.&lt;br /&gt;
&lt;br /&gt;
====== Parameters in SSH command ======&lt;br /&gt;
&lt;br /&gt;
 ssh -o &amp;quot;ProxyCommand socat STDIO SOCKS4A:localhost:%h:%p,socksport=9050&amp;quot; -o PreferredAuthentications=password -o PubkeyAuthentication=no pi@[onion address]&lt;br /&gt;
&lt;br /&gt;
====== Parameters in SSH config file ======&lt;br /&gt;
&lt;br /&gt;
Add your config to &amp;#039;&amp;#039;~/.ssh/config&amp;#039;&amp;#039; . Create the file if it doesn&amp;#039;t exist.&lt;br /&gt;
&lt;br /&gt;
 Host raspberry-tor&lt;br /&gt;
     HostName [onion address]&lt;br /&gt;
     User pi&lt;br /&gt;
     PreferredAuthentications password&lt;br /&gt;
     PubkeyAuthentication no&lt;br /&gt;
     ProxyCommand socat STDIO SOCKS4A:localhost:%h:%p,socksport=9050&lt;br /&gt;
&lt;br /&gt;
Then, to connect to the Raspberry, you invoke your SSH session with:&lt;br /&gt;
&lt;br /&gt;
 ssh raspberry-tor&lt;br /&gt;
&lt;br /&gt;
==== Mac ====&lt;br /&gt;
Todo&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
Todo&lt;br /&gt;
 &lt;br /&gt;
== Expanding the functionality ==&lt;br /&gt;
=== Forwarding of local ports ===&lt;br /&gt;
&lt;br /&gt;
Suppose there is also a LanBox &amp;lt;ref&amp;gt;[[https://www.lanbox.com]]&amp;lt;/ref&amp;gt; in the remote network. We can connect to the LanBox via our Tor-Raspi with our locally installed LCedit+ (LanBox&amp;#039;s software suite) by forwarding a few ports towards the IP of the LanBox. Given the LanBox has the IP address 10.0.0.3, then the ssh command to forward the necessary ports is:&lt;br /&gt;
&lt;br /&gt;
 ssh -o &amp;quot;ProxyCommand socat STDIO SOCKS4A:localhost:%h:%p,socksport=9050&amp;quot; -o PreferredAuthentications=password -o PubkeyAuthentication=no -L 4776:10.0.0.3:777 -L 4777:10.0.0.3:4777 -L 6454:10.0.0.3:6454 pi@[onion address]&lt;br /&gt;
&lt;br /&gt;
Then, when starting LCedit+, connect to &amp;#039;&amp;#039;localhost:4776&amp;#039;&amp;#039; . By default the LanBox is using port 777 for the authentication but by using port 4776 instead we avoid invoking ssh with root privileges. Ports below 1024 are so called &amp;#039;&amp;#039;system ports&amp;#039;&amp;#039; and require root privileges to temper with.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Caveat:&amp;#039;&amp;#039;&amp;#039; because the Lanbox&amp;#039;s authentication channel isn&amp;#039;t encrypted, it&amp;#039;s a good idea to use at least a SSH port forward if you&amp;#039;re connecting to your LanBox via a possibly hostile network, like the Internet. Otherwise your LanBox&amp;#039;s password can be scooped in transit and ghosts might enter your machine.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Or you store the parameters in the SSH config file (~/.ssh/config) for easier invokation:&lt;br /&gt;
&lt;br /&gt;
 Host raspberry-forward-tor&lt;br /&gt;
     HostName [onion address]&lt;br /&gt;
     User pi&lt;br /&gt;
     PreferredAuthentications password&lt;br /&gt;
     PubkeyAuthentication no&lt;br /&gt;
     ProxyCommand socat STDIO SOCKS4A:localhost:%h:%p,socksport=9050&lt;br /&gt;
     LocalForward 4776 10.0.0.3:777&lt;br /&gt;
     LocalForward 4777 10.0.0.3:4777&lt;br /&gt;
     LocalForward 6454 10.0.0.3:6454&lt;br /&gt;
&lt;br /&gt;
And invoke ssh with:&lt;br /&gt;
&lt;br /&gt;
 ssh raspberry-forward-tor&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*[[UDP over SSH]] (UDP over SSH over Tor is also possible)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&amp;lt;references /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>HR</name></author>
	</entry>
</feed>