<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>TOP5: Diverses, Verschiedenes, ...</title>
    <link>http://patrick.georgi-clan.de/</link>
    <description>alles, was mir so einfällt</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:patrick@georgi-clan.de" />
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <managingEditor>patrick@georgi-clan.de</managingEditor>
<webMaster>patrick@georgi-clan.de</webMaster>
<pubDate>Thu, 12 May 2011 17:41:43 GMT</pubDate>

    <image>
        <url>http://patrick.georgi-clan.de/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: TOP5: Diverses, Verschiedenes, ... - alles, was mir so einfällt</title>
        <link>http://patrick.georgi-clan.de/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Tunneling svnserve through SSH the right way[tm]</title>
    <link>http://patrick.georgi-clan.de/archives/113-Tunneling-svnserve-through-SSH-the-right-waytm.html</link>
            <category>Software</category>
    
    <comments>http://patrick.georgi-clan.de/archives/113-Tunneling-svnserve-through-SSH-the-right-waytm.html#comments</comments>
    <wfw:comment>http://patrick.georgi-clan.de/wfwcomment.php?cid=113</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://patrick.georgi-clan.de/rss.php?version=2.0&amp;type=comments&amp;cid=113</wfw:commentRss>
    

    <author>patrick@georgi-clan.de (Patrick Georgi)</author>
    <content:encoded>
    &lt;p&gt;I had to setup some SVN repositories in a quite restrictive network today: HTTP works through proxy, and SSH is available.&lt;/p&gt; 
&lt;p&gt;Options:&lt;/p&gt; 
&lt;ul&gt; 
&lt;li&gt;Setup web access (downside: harder to manage with write access)&lt;/li&gt; 
&lt;li&gt;Use svn+ssh protocol (downside: spawns a separate server process that tries to use the repo)&lt;/li&gt; 
&lt;li&gt;Use ssh port forwarding (downside: SSH must be started before)&lt;br /&gt;&lt;/li&gt; 
&lt;li&gt;Do it properly!&lt;/li&gt; 
&lt;/ul&gt;I opted for &amp;quot;properly&amp;quot;, and here&#039;s how:






&lt;ol&gt; 
&lt;li&gt;Make sure, netcat exists on the server&lt;/li&gt; 
&lt;li&gt;Make sure, ssh access to the server exists (can be a limited ssh account that can only run a single command, and SSH is not used for svn authentication at all)&lt;/li&gt; 
&lt;li&gt;Create a script on the client calling &amp;quot;&lt;code&gt;ssh $1 netcat localhost 3690&lt;/code&gt;&amp;quot;&lt;/li&gt; 
&lt;li&gt;Set up a tunnel in &lt;code&gt;~/.subversion/config&lt;/code&gt;, eg. (in section &lt;code&gt;[tunnel]&lt;/code&gt;) &amp;quot;&lt;code&gt;tunnel = /path/to/clientscript&lt;/code&gt;&amp;quot;&lt;/li&gt; 
&lt;li&gt;Access the repo with svn-tunnel://host/path&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;And that&#039;s all there is to it: svn-tunnel gets routed to the &amp;quot;&lt;code&gt;tunnel = &lt;/code&gt;&amp;quot; line, so svn calls the client script with arguments &amp;quot;&lt;code&gt;$host svnserve -t&lt;/code&gt;&amp;quot;, so the client script creates an ssh connection to the server $host, with the command &amp;quot;&lt;code&gt;netcat localhost 3690&lt;/code&gt;&amp;quot; to be run on the server.&lt;/p&gt; 
&lt;p&gt;The server calls &amp;quot;&lt;code&gt;netcat localhost 3690&lt;/code&gt;&amp;quot;, providing the svnserve protocol to stdin/stdout like any good tunnel should do, and svn authenticates over it.&lt;/p&gt; 
&lt;p&gt;For larger deployments, there could be a special ssh user available to all (no auth at all) providing SSH tunneled access to svnserve.&lt;/p&gt; 
&lt;p&gt;If only subversion knew some substitution syntax, the client side script could be dropped, too (eg. &amp;quot;tunnel = ssh %h netcat localhost 3690&amp;quot;)&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 12 May 2011 19:38:00 +0200</pubDate>
    <guid isPermaLink="false">http://patrick.georgi-clan.de/archives/113-guid.html</guid>
    
</item>

</channel>
</rss>
