<?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>JAKERI &#187; forward</title>
	<atom:link href="http://www.jakeri.net/tag/forward/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakeri.net</link>
	<description>Consulting/Development in Java, Objective-C for web based systems and iPhone</description>
	<lastBuildDate>Sun, 23 May 2010 20:04:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSL to SSH tunneling (stunnel)</title>
		<link>http://www.jakeri.net/2009/01/ssl-to-ssh-tunneling-stunnel/</link>
		<comments>http://www.jakeri.net/2009/01/ssl-to-ssh-tunneling-stunnel/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 22:35:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[forward]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[stunnel]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=99</guid>
		<description><![CDATA[<p>Sometimes it can be handy to reach your home server even if you have all sorts of proxy servers and firewalls between you and your home server (e.g. from work). </p>
<p>Stunnel to the rescue!. Compile it, install it or just download it from some repository (I used macports).</p>
<p>On the server:</p>

Create server configuration file for stunnel. Example [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it can be handy to reach your home server even if you have all sorts of proxy servers and firewalls between you and your home server (e.g. from work). </p>
<p><strong><a href="http://www.stunnel.org/">Stunnel</a> to the rescue!</strong>. Compile it, install it or just download it from some repository (I used <a href="http://www.macports.org/">macports</a>).</p>
<p>On the server:</p>
<ol>
<li>Create server configuration file for stunnel. Example below accepts ssl traffic on port 443 and forwards unencrypted traffic to the ssh port (22). Add your own certificate file for higher security.<br/><br />
<code>cert=stunnel.pem<br />
pid=/tmp/stunnel.pid<br />
[stunnel443]<br />
accept = 192.168.1.7:443<br />
connect = 192.168.1.7:22</code>
</li>
<li>Run <code>sudo stunnel &lt;server-config-file&gt;</code></li>
<li>Test to connect with openssl, <code>openssl s_client -connect 192.168.1.7:443</code>. After all ssl handshake code you should probably get something like: <em>SSH-1.99-OpenSSH_5.1</em></li>
<li>And now you have a SSH over SSL!</li>
</ol>
<p>On your client machine:</p>
<ol>
<li>Create a new client side configuration file. This will create a listener on port 21222 and all traffic will be sent ssl-encrypted to 192.168.1.7:443<br/><br />
<code>#cert = stunnel.pem<br />
pid=/tmp/stunnelclient.pid<br />
#foreground=yes<br />
client=yes<br />
[21222]<br />
accept=21222<br />
connect=192.168.1.7:443</code>
</li>
<li>Run <code>sudo stunnel &lt;client-config-file&gt;</code></li>
<li>It should now be possible to run <code>ssh -p 21222 localhost</code> to create a connection to your server machine</li>
</ol>
<p>Voilà, a SSL tunnel for transporting SSH!<br />
All SSH traffic nicely hidden in a SSL tunnel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/01/ssl-to-ssh-tunneling-stunnel/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
