snipt

Ctrl+h for KB shortcuts

Ruby

ssh port forwarding

#This forwards all localhost:1234 connections to google.com:80 through gimli
ssh -L 1234:google.com:80 gimli.cs.berkeley.edu
https://snipt.net/embed/554defb67545e7a2885fa8560c668925/
/raw/554defb67545e7a2885fa8560c668925/
554defb67545e7a2885fa8560c668925
rb
Ruby
2
2019-06-23T23:32:46
True
False
False
/api/public/snipt/8832/
ssh-port-forwarding
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">#This forwards all localhost:1234 connections to google.com:80 through gimli</span> </span><span id="L-2"><a name="L-2"></a><span class="n">ssh</span> <span class="o">-</span><span class="n">L</span> <span class="mi">1234</span><span class="ss">:google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">80</span> <span class="n">gimli</span><span class="o">.</span><span class="n">cs</span><span class="o">.</span><span class="n">berkeley</span><span class="o">.</span><span class="n">edu</span> </span></pre></div> </td></tr></table>
forwarding, mysql, server, shell, ssh