<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
    <channel>
        <title>Silas Sewell - December 2007</title>
        <atom:link href="http://www.silassewell.com/blog/2007/12/rss2.xml" rel="self" type="application/rss+xml" />
        <link>http://www.silassewell.com/blog/2007/12</link>
        <description>Infrastructure Development</description>
        <lastBuildDate>Sat, 21 Aug 2010 00:00:00 GMT</lastBuildDate>
        <generator>http://www.silassewell.com/</generator>
        <language>en</language>
        <sy:updatePeriod>hourly</sy:updatePeriod>
        <sy:updateFrequency>1</sy:updateFrequency>

        <item>
            <title>Simple Shell Script to Manage SSH Tunnels</title>
            <link>http://www.silassewell.com/blog/2007/12/15/simple-shell-script-manage-ssh-tunnels/</link>
            <pubDate>Sat, 15 Dec 2007 00:00:00 GMT</pubDate>
            <dc:creator>silas</dc:creator>
            <category><![CDATA[Bash]]></category><category><![CDATA[CLI]]></category><category><![CDATA[Operating Systems]]></category><category><![CDATA[SSH]]></category>
            <guid isPermaLink="true">http://www.silassewell.com/blog/2007/12/15/simple-shell-script-manage-ssh-tunnels/</guid>
            <description><![CDATA[<p>Manage SSH Tunnel is a simple shell script to start and stop ssh tunnels from the terminal.</p>

<h3>Setup</h3>

<p>Note: the setup assumes bash as the default shell</p>

<ol>
<li>Download <a href="http://www.silassewell.com/blog/2007/12/15/simple-shell-script-manage-ssh-tunnels/tunnel.sh">tunnel.sh</a> and save it to ~/bin/</li>
<li><p>Add to <code class="prettyprint">~/.bash_profile</code> or <code class="prettyprint">~/.bashrc</code></p>

<pre><code class="prettyprint">alias tunnel_home='/bin/sh ~/bin/tunnel.sh example.net sam 22 8888'
</code></pre></li>
<li><p>Replace example.net with the hostname of the server, sam with the username
on the server, and 8888 with the local tunnel port</p></li>
<li>Type <code class="prettyprint">source ~/.bash_profile</code> or <code class="prettyprint">source ~/.bashrc</code></li>
</ol>

<h3>Usage</h3>

<ol>
<li><p>To open the tunnel</p>

<pre><code class="prettyprint">tunnel_home start
</code></pre></li>
<li><p>To close the tunnel</p>

<pre><code class="prettyprint">tunnel_home close
</code></pre></li>
</ol>]]></description>
        </item>

    </channel>
</rss>