<?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>Pieces of Life... &#187; ssh</title>
	<atom:link href="http://www.bogdanirimia.ro/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bogdanirimia.ro</link>
	<description>Bogdan Irimia&#039;s Web Space</description>
	<lastBuildDate>Fri, 18 Mar 2011 20:11:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SSH with PuTTY through a proxy</title>
		<link>http://www.bogdanirimia.ro/ssh-with-putty-through-a-proxy/96</link>
		<comments>http://www.bogdanirimia.ro/ssh-with-putty-through-a-proxy/96#comments</comments>
		<pubDate>Fri, 18 Dec 2009 00:06:32 +0000</pubDate>
		<dc:creator>Myself</dc:creator>
				<category><![CDATA[Server administration]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[PuTTY]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.bogdanirimia.ro/?p=96</guid>
		<description><![CDATA[For security reasons, I had to set all my server&#8217;s firewalls to accept connections on the SSH port (22) only from my office IP. I would have added my home IP addres in the access list, if it would have been static. But at home I have a dynamic IP so I can&#8217;t use IP-based [...]]]></description>
			<content:encoded><![CDATA[<p>For security reasons, I had to set all my server&#8217;s firewalls to accept connections on the SSH port (22) only from my office IP. I would have added my home IP addres in the access list, if it would have been static. But at home I have a dynamic IP so I can&#8217;t use IP-based access control in this case. So the only thing I could do to admin my servers from home was to connect first to the office and then to connect, from there, on the server that had to be administered.</p>
<p>Today I set up a new way to connect to my servers from anywhere. I installed a proxy on the office server, and configured PuTTY to use it for the connections to the secured servers. The following are the steps to configure a Linux server (Ubuntu in my case) and PuTTY to make a SSH connection through a proxy:</p>
<p>1. Install mod_proxy and mod_proxy_connect for Apache, and enable them. In Ubuntu (mine is 8.04), these modules are already installed and all you need to do is to enable them:</p>
<pre class="brush: bash; title: ; notranslate">
# a2enmod proxy
# a2enmod proxy_connect
</pre>
<p>2. Configure the proxy by editing the &#8220;proxy.conf&#8221; file:</p>
<pre class="brush: bash; title: ; notranslate">
&lt;IfModule mod_proxy.c&gt;

    ProxyRequests On
    AllowCONNECT 22

    &lt;Proxy *&gt;
        AddDefaultCharset off
        Order deny,allow
        Allow from all
        AuthType Basic
        AuthName &quot;SSH Proxy&quot;
        AuthUserFile /path/to/password/file
        Require user myusername
    &lt;/Proxy&gt;
    ProxyVia Block
&lt;/IfModule&gt;
</pre>
<p>3. Restart Apache<br />
4. Configure PuTTY to use the proxy for the corresponding connections. For this, in the left tree, the &#8220;Proxy&#8221; submenu in the &#8220;Connection&#8221; menu must be used. There, select &#8220;HTTP&#8221; as Proxy type, then enter the hostname of your newly configured proxy, the username and password.</p>
<p style="text-align: left;"><img class="size-full wp-image-100 aligncenter" title="putty_proxy" src="http://www.bogdanirimia.ro/wp-content/uploads/2009/12/putty_proxy.jpg" alt="putty_proxy" width="466" height="448" />Now you should have a functioning proxied SSH connection! Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bogdanirimia.ro/ssh-with-putty-through-a-proxy/96/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

