<?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>Penguins-On-Hudson</title>
	<atom:link href="http://cdfx.penguins-on-hudson.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cdfx.penguins-on-hudson.com</link>
	<description>Linux &#38; F.O.S.S. in the Hudson River Valley.</description>
	<lastBuildDate>Thu, 31 Mar 2011 05:06:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Subversion Is An Old Man&#8217;s Tool.</title>
		<link>http://cdfx.penguins-on-hudson.com/2011/03/30/subversion-is-an-old-mans-tool/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2011/03/30/subversion-is-an-old-mans-tool/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 01:54:50 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Fun with F.O.S.S.]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[Distributed Version Control]]></category>
		<category><![CDATA[DRCS]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Joel Spolsky]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/?p=240</guid>
		<description><![CDATA[As Joel Spolsky put it: &#8220;Distributed Version Control is here to stay, baby”. If you&#8217;ve read Joel&#8217;s stuff, you know he has a way of making sense — a quality of writing which can be tough to find on the Internet. As a Git user, I can&#8217;t say Joel converted me, but he did get <a href='http://cdfx.penguins-on-hudson.com/2011/03/30/subversion-is-an-old-mans-tool/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://cdfx.penguins-on-hudson.com/wp-content/cdfx_uploads/2011/03/git_150x82.png" alt="Distributed Version Control" title="Distributed Version Control" width="150" height="82" class="alignright size-full wp-image-266 colorbox-240" /> As Joel Spolsky put it: &#8220;<a href="http://www.joelonsoftware.com/items/2010/03/17.html">Distributed Version Control is here to stay, baby</a>”. If you&#8217;ve read Joel&#8217;s stuff, you know he has a way of making sense — a quality of writing which can be tough to find on the Internet. As a Git user, I can&#8217;t say Joel converted me, but he did get me thinking about why I too hung on to familiar ol&#8217; Subversion long after it&#8217;s obsolescence. Rather than boring you with that, herein lies a <strong>minimalist guide to getting started with distributed version control</strong>. <span id="more-240"></span></p>
<p>If you are wondering about the Git vs Mercurial (Hg) debate, don&#8217;t bother. Both work well and can even be used in tandem. The focus here will be on Git because it has alphabetical priority, and Joel has already written <a href="http://hginit.com">Hg Init: a Mercurial tutorial</a>.</p>
<p>For experienced developers, the hardest part about learning Git is unlearning Subversion or other legacy VCS. Here are a few things to keep in mind (if you get bored, just substitute &#8220;jedi&#8221; for &#8220;repository&#8221;):</p>
<ul>
<li>Any repository can be cloned.</li>
<li>Any repository can be a master.</li>
<li>Distributed VCS doesn&#8217;t <em>mandate</em> distribution.</li>
<li>Local changes: <span class="code">checkout</span>, <span class="code">commit</span></li>
<li>Remote changes: <span class="code">pull</span>, <span class="code">push</span></li>
</ul>
<h3>A New Repository</h3>
<p>Don&#8217;t be put off the &#8216;distributed&#8217; bit, git is perfectly happy to have just one folder — repository and working copy all rolled into one:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>foo
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>foo
<span style="color: #c20cb9; font-weight: bold;">git</span> init
<span style="color: #666666; font-style: italic;"># add some files</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> add .
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span><span style="color: #ff0000;">'initial checkin'</span></pre></div></div>

<p>So Git scales down nicely, but with shared repositories it is important to know that Git will grouse if asked to push changes to a destination where files are checked out. This problem is easily avoided with a <em>bare repository</em>, essentially a repository which cannot have files checked out locally:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>foo
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>foo
<span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--bare</span> init</pre></div></div>

<h3>Send in the Clones</h3>
<p>Where git repositories already exist, new ones can be cloned; optionally, the new clone can be <span class="code">&#8211;bare</span>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># new working copy:</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>user<span style="color: #000000; font-weight: bold;">@</span>gitserver<span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>foo
<span style="color: #c20cb9; font-weight: bold;">git</span> pull
&nbsp;
<span style="color: #666666; font-style: italic;"># bare clone:</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #660033;">--bare</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>user<span style="color: #000000; font-weight: bold;">@</span>gitserver<span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>foo
<span style="color: #c20cb9; font-weight: bold;">git</span> pull</pre></div></div>

<h3>Go with the Workflow</h3>
<p>Much of the Git workflow is straightforward, especially if your working copy was cloned from a (bare) master repository:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># get the latest changes</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> pull
&nbsp;
<span style="color: #666666; font-style: italic;"># make some changes</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #007800;">count</span>=<span style="color: #000000;">1</span> \;
&nbsp;
<span style="color: #666666; font-style: italic;"># oh crap! I just (sort of) Zeroed all my files</span>
<span style="color: #666666; font-style: italic;"># no worries, just abandon the changes</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">git</span> checkout .
&nbsp;
<span style="color: #666666; font-style: italic;"># double check</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> status
&nbsp;
<span style="color: #666666; font-style: italic;"># make changes worth keeping</span>
<span style="color: #666666; font-style: italic;"># ... then commit</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-a</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># need to amend the last check-in message?</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">--amend</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># push local changes to master</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> push</pre></div></div>

<p>There&#8217;s enough to jump in and get into trouble with git; to find out more, try the following resources:</p>
<ul>
<li><a href="http://git-scm.com/documentation">Git Documentation</a>
<li><a href="http://git-scm.com/tools">Git Tools &#038; Hosting</a></li>
<li><a href="https://git.wiki.kernel.org/index.php/GitFaq#Why_the_.27git.27_name.3F">Why is it called &#8220;git&#8221;?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2011/03/30/subversion-is-an-old-mans-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Security: Denyhosts</title>
		<link>http://cdfx.penguins-on-hudson.com/2011/02/15/linux-security-denyhosts/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2011/02/15/linux-security-denyhosts/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 23:23:31 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Business Linux]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[News & Reviews]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tcpwrappers]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/?p=212</guid>
		<description><![CDATA[If you&#8217;ve read my OpenSSH series, perhaps even if you haven&#8217;t, you are probably aware of the power SSH offers to those who know how to use it. There are many ways to protect the service from unauthorized usage, focusing on self-contained or single host solutions, one finds two common flavors: those which make use <a href='http://cdfx.penguins-on-hudson.com/2011/02/15/linux-security-denyhosts/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve read my <a href="http://blog.penguins-on-hudson.com/2008/09/25/openssh-prelude/">OpenSSH series</a>, perhaps even if you haven&#8217;t, you are probably aware of the power SSH offers to those who know how to use it.  <img class="colorbox-212"  src="http://codefix.net/img/Server%20Support.png" alt="Command line bits." align="right" /> There are many ways to protect the service from unauthorized usage, focusing on self-contained or single host solutions, one finds two common flavors: those which make use of the <a href="http://www.netfilter.org/">Linux kernel&#8217;s packet filtering</a> tools (netfilter and iptables), and those which rely on <a href="http://www.porcupine.org/wietse/">Wietse Venema&#8217;s</a> <a href="ftp://ftp.porcupine.org/pub/security/index.html#software">TCP Wrappers</a>. Netfilter certainly offers power and flexibility, but this may be at the cost of simplicity and management ease. While no security measure ought to be implemented blindly, there is an undeniable benefit to simple measures which can be configured quickly and with little fuss — in this arena, TCP Wrappers stands tall.<br />
<span id="more-212"></span><br />
While TCP Wrappers is a tool worth knowing well, it also offers a flexibility which can lead to complexity; fortunately for those unfamiliar with it, or those who simply want to block ubiquitous Internet port scanners with a low management tool, there is <a href="http://denyhosts.sourceforge.net/">DenyHosts</a>. In essence, DenyHosts watches a system&#8217;s logs for failed logins which exceed configurable thresholds, adding offending IP addresses to TCP Wrapper&#8217;s deny list.</p>
<p>The configuration has fairly sensible defaults, but certain parameters merit careful consideration. In the common case of port scans from an interminable list of different source IP addresses, it probably makes sense to periodically purge hosts.deny (e.g. PURGE_DENY = 5d) while setting a threshold for permanent banishment (e.g. PURGE_THRESHOLD = 2).</p>
<p>The ability to set a lower threshold for failed logins to specific accounts (e.g. root, nobody, www-data) is nice, but the default configuration sets different thresholds for valid vs invalid user accounts. This seems unnecessary, as any attacker is unlikely to guess the password for an account which does not exist; moreover, this configuration makes it possible to enumerate valid login accounts. The best threshold value depends on how many legitimate shell users exists, whether authentication is interactive or dual key, etc., but I strongly recommend setting DENY_THRESHOLD_INVALID and DENY_THRESHOLD_VALID to the same value.</p>
<p>Perhaps my favorite feature of Denyhosts is the ability to enable server synchronization (SYNC_SERVER), which allows the server to share blocked IP addresses with a central server at denyhosts.net. Whilst it would be nice if the author would publish the XML RPC server daemon under an open source license, the availability of an active public server seems have sufficiently offset the incentive to reinvent this particular wheel.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2011/02/15/linux-security-denyhosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud Life: Kernel Upgrades</title>
		<link>http://cdfx.penguins-on-hudson.com/2011/01/12/cloud-life-kernel-upgrades/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2011/01/12/cloud-life-kernel-upgrades/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 04:28:24 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Business Linux]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[IMAGE]]></category>
		<category><![CDATA[Kernel]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/?p=165</guid>
		<description><![CDATA[Eventually the Ubuntu package maintainers would like to have the package manager (at a minimum) provide specific instructions whenever a new kernel is available; until they do, or Amazon adds such a feature to the AWS Console, this is the way to upgrade the kernel on EC2 instances.]]></description>
			<content:encoded><![CDATA[<p>One thing not mentioned in <a href="https://help.ubuntu.com/community/EC2StartersGuide">EC2StartersGuide</a> is how to apply kernel patches. Technically, this isn&#8217;t currently possible in the Amazon cloud, which is to say that the boot loader (e.g. <a title="Grand Unified Boot Loader" href="http://www.gnu.org/software/grub/">grub</a>) within an EC2 instance cannot load an arbitrary kernel; nonetheless, official kernel updates are available via package updates, though cloud servers won&#8217;t automatically load the latest installed kernel when booted.  <span id="more-165"></span></p>
<p>A fix was recently released for an ec2 kernel bug causing high load averages to be reported. The new kernel package was <em>linux-image-2.6.32-309-ec2</em> and aptitude reports the exact version:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> show linux-image-2.6.32-<span style="color: #000000;">309</span>-ec2 <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> Version
Version: 2.6.32-<span style="color: #000000;">309.18</span></pre></div></div>

<p>We can get a list of available kernels with ﻿﻿﻿<a href="http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/"><span class="code">ec2-describe-images</span></a>, official Ubuntu kernels are owned by account #<span style="color: #800080;">099720109477</span>. We can filter the results based on the image name, the following example (edited for brevity) shows stable kernels for Ubuntu Lucid:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> ec2-describe-images <span style="color: #660033;">-o</span> 099720109477 \
    <span style="color: #660033;">--filter</span> <span style="color: #007800;">name</span>=ubuntu-kernels<span style="color: #000000; font-weight: bold;">/</span>ubuntu-lucid-i386\<span style="color: #000000; font-weight: bold;">*</span>
IMAGE	aki-754aa41c	... linux-image-2.6.32-<span style="color: #000000;">305</span>-ec2 ...
IMAGE	aki-5037dd39	... linux-image-2.6.32-<span style="color: #000000;">308</span>-ec2 ...
IMAGE	aki-3204f15b	... linux-image-2.6.32-<span style="color: #000000;">308</span>-ec2 ...
IMAGE	aki-6603f70f	... linux-image-2.6.32-<span style="color: #000000;">309</span>-ec2 ...</pre></div></div>

<p>While not shown above, the full version is displayed; however in this case there is only one kernel in the 2.6.32-309 series. This is easily seen by altering the example filter to <span class="code">ubuntu-kernels\*/ubuntu-lucid-i386\*</span>, which will include images from <em>ubuntu-kernels-testing</em>, <em>ubuntu-kernels-sandbox</em>, etc. The second column lists the kernel ID, which may be used with ﻿﻿﻿<a href="http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/"><span class="code">ec2-modify-instance-attribute</span></a> to actually change the kernel used by an EC2 instance:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ec2-modify-instance-attribute <span style="color: #660033;">--kernel</span> aki-6603f70f <span style="color: #800000;">${instance_id}</span></pre></div></div>

<p>A list of your instances and the current kernels is conveniently displayed with <a href="http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/"><span class="code">ec2-describe-instances</span></a> as well as the <a href="http://aws.amazon.com/console/">AWS Management Console</a>.</p>
<p>Eventually the Ubuntu package maintainers would like to have the package manager (at a minimum) provide specific instructions whenever a new kernel is available; until they do, or Amazon adds such a feature to the AWS Console, this is the way to upgrade the kernel on EC2 instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2011/01/12/cloud-life-kernel-upgrades/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing MySQL</title>
		<link>http://cdfx.penguins-on-hudson.com/2011/01/04/managing-mysql/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2011/01/04/managing-mysql/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 20:49:32 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Business Linux]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Query Browser]]></category>
		<category><![CDATA[Tools Bundle]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/?p=173</guid>
		<description><![CDATA[Database management is one of those tasks where GUI tools can often be handy and occasionally critical. Despite a checkered history in this regard, MySQL users can depend on MySQL Workbench ...]]></description>
			<content:encoded><![CDATA[<p>Database management is one of those tasks where GUI tools can often be handy and occasionally critical. The history of Linux point-and-click tools for MySQL is a bit checkered, and prominently features <strong>MySQL Query Browser</strong> and <strong>MySQL Administrator</strong>, official tools formerly supported by MySQL. Early releases were buggy and crash-prone, but had progressed to merely flaky by late 2009, when <a href="http://dev.mysql.com/support/eol-notice.html">MySQL announced</a> they would pull the trigger on them in favor of <a href="http://dev.mysql.com/downloads/workbench/">MySQL Workbench</a>. MySQL support for the GUI Tools Bundle officially ended in June 2010, but the tools are still available in Debian and Ubuntu repositories, while <a href="http://dev.mysql.com/downloads/workbench/">MySQL Workbench</a> is conspicuously absent. While this may deter many users from test driving Workbench, they are missing out on a powerful tool for database management. Fortunately, MySQL publishes <a href="http://dev.mysql.com/downloads/workbench/">MySQL Workbench binaries</a>. <span id="more-173"></span></p>
<p>I don&#8217;t work for MySQL, so I shan&#8217;t extol it&#8217;s virtues in any detail, but having installed it on Ubuntu 10.10, it does seem to be a robust and feature rich application for SQL Development, Data Modelling, and Server Administration. There is, however, one feature I will praise as brilliant forward thinking: built in support for MySQL connections over SSH (see screenshot below).</p>
<p><a href="http://codefix.net/img/mysql-connect.png"><img class="alignright size-thumbnail wp-image-182 colorbox-173" title="mysql-connect" src="http://codefix.net/img/mysql-connect.png" alt="" width="480" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2011/01/04/managing-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transatlantic Text Editing</title>
		<link>http://cdfx.penguins-on-hudson.com/2010/09/20/transatlantic-text-editing/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2010/09/20/transatlantic-text-editing/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 05:11:47 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[Managing Line Endings]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/?p=103</guid>
		<description><![CDATA[Philip has posted a brief follow up to Managing Line Endings over at Armadillo. He&#8217;s also got some articles which may be useful for anyone forced to use SSH on Windows.]]></description>
			<content:encoded><![CDATA[<p><a href="http://uk.linkedin.com/in/philipmobrien">Philip</a> has posted a brief follow up to <a href="http://cdfx.penguins-on-hudson.com/2007/05/21/managing-line-endings/">Managing Line Endings</a> over at <a href="http://armadillo.org.uk/ssh/texteditors/texteditors.html">Armadillo</a>. He&#8217;s also got some articles which may be useful for anyone forced to use <a href="http://www.armadillo.org.uk/ssh/ssh_and_more.html">SSH on Windows</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2010/09/20/transatlantic-text-editing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 Easy Steps to SSL Client Authentication</title>
		<link>http://cdfx.penguins-on-hudson.com/2010/05/19/3-easy-steps-to-ssl-client-authentication/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2010/05/19/3-easy-steps-to-ssl-client-authentication/#comments</comments>
		<pubDate>Wed, 19 May 2010 21:29:28 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Business Linux]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[Example Inc]]></category>
		<category><![CDATA[General George Smith Patton]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/2010/05/19/3-easy-steps-to-ssl-client-authentication/</guid>
		<description><![CDATA[There are many resources on the Internet for correctly securing apache web sites with X.509 client certificate authentication. This isn&#8217;t one of them. What follows is a three step guide to the fastest, easiest method for setting up self-signed server and client certificates. You are advised not to run any of the commands below in <a href='http://cdfx.penguins-on-hudson.com/2010/05/19/3-easy-steps-to-ssl-client-authentication/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>There are many resources on the Internet for correctly securing <a href="http://www.apache.org/">apache</a> web sites with X.509 client certificate authentication. <strong>This isn&#8217;t one of them.</strong> What follows is a three step guide to the fastest, easiest method for setting up <a href="http://en.wikipedia.org/wiki/Self-signed_certificate">self-signed</a> server and client certificates. You are advised not to run any of the commands below in a <a href="http://www.google.com/search?q=define:production+environment">production environment</a>, they are presented only as an aid for those who learn <a title="Wikipedia Entry: Kinesthetic Learning" href="http://en.wikipedia.org/wiki/Kinesthetic_learning">kinesthetically</a>.</p>
<blockquote><p><span class="bqstart">“</span>A good solution applied with vigor now is better than a perfect solution applied ten minutes later.<span class="bqend">”</span><br />
<span class="attr">- <a href="http://en.wikipedia.org/wiki/Patton">General George Smith Patton III</a> <em><a href="http://en.wikiquote.org/wiki/George_S._Patton">(source)</a></em></span></p></blockquote>
<p><span id="more-56"></span><br />
Most readers are probably familiar with <a href="http://en.wikipedia.org/wiki/X.509">X.509 certificates</a> as used with <a title="Transport Layer Security/Secure Sockets Layer" href="http://en.wikipedia.org/wiki/Transport_Layer_Security">TLS/SSL</a> to secure websites with strong encryption. For commercial websites, this usually means presenting a <a href="http://en.wikipedia.org/wiki/Digital_certificate">digital certificate</a> which has been verified and signed by a <a href="http://en.wikipedia.org/wiki/Certification_Authority">certificate authority</a> , once the secure connection is established, user credentials are passed, e.g. username/password; however, X.509 certificates may also be used on the client side to supplement or even eliminate the need for users to enter passwords.</p>
<p>Intranets and temporary web applications are two examples wherein developers may choose to forgo the use of a widely accepted certificate authority in favor of a self-signed certificate. Naturally, this is a compromise which may or not impinge overall security depending on factors which will not be considered here.Strictly considered, this text has little information on security at all, rather, it is simply outlines an expedient way to set up X.509 client certificate authentication.</p>
<p class="nstep">1. The Server Certificate</p>
<p>The following command will generate a self-signed web certificate and unencrypted key (no password required).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-x509</span> <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-out</span> server.crt <span style="color: #660033;">-keyout</span> server.key <span style="color: #660033;">-days</span> <span style="color: #000000;">1825</span> \
 <span style="color: #660033;">-subj</span> <span style="color: #ff0000;">&quot;/C=US/ST=NY/O=Example Inc/CN=example.com/emailAddress=info@example.com/&quot;</span></pre></div></div>

<p class="nstep">2. Configuring Apache</p>
<p>This example illustrates enabling SSL in the apache config, note that because this is a self signed certificate, the same file is used for the Certificate and CA Certificate. The <a href="http://httpd.apache.org/docs/2.0/mod/core.html#location">&lt;Location&gt; directive</a> specifies where client certificates will be required; visit the Apache site for <a href="http://httpd.apache.org/docs/2.0/ssl/ssl_howto.html">additional relevant directives</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">  <span style="color: #00007f;">DocumentRoot</span> /var/www/example.com
  <span style="color: #00007f;">ServerName</span> example.com
  <span style="color: #00007f;">ServerAlias</span> *.example.com
&nbsp;
  <span style="color: #00007f;">SSLEngine</span> <span style="color: #0000ff;">on</span>
  <span style="color: #00007f;">SSLCertificateFile</span> conf/ssl/example.crt
  <span style="color: #00007f;">SSLCertificateKeyFile</span> conf/ssl/example.key
  <span style="color: #00007f;">SSLCACertificateFile</span> conf/ssl/example.crt
&nbsp;
    <span style="color: #00007f;">SSLRequireSSL</span>
    <span style="color: #00007f;">SSLVerifyClient</span> <span style="color: #00007f;">require</span>
    <span style="color: #00007f;">SSLVerifyDepth</span> <span style="color: #ff0000;">10</span></pre></div></div>

<p class="nstep">3. Client Certificates</p>
<p>The server certificate is used to generate a client certificate using the <a title="PKCS#12" href="http://en.wikipedia.org/wiki/PKCS12">PKCS#12</a> standard</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl pkcs12 <span style="color: #660033;">-export</span> <span style="color: #660033;">-out</span> example.pfx <span style="color: #660033;">-in</span> example.crt <span style="color: #660033;">-inkey</span> example.key \
<span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;Example Client Certificate&quot;</span></pre></div></div>

<p>If a password was entered during the previous command, users will need to enter the same password when installing the certificate. Firefox users can import <span class="code">example.pfx</span> by navigating through:</p>
<p class="nowrap-small" style="text-align: center;">Prefs ⇨ Encryption ⇨ View Certs ⇨ Your Certs ⇨ Import</p>
<p>Upon visiting <span style="color: #688aad;">https://example.com/clients</span> users will be prompted to present the client certificate.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2010/05/19/3-easy-steps-to-ssl-client-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Practical View of Comcast vs FCC</title>
		<link>http://cdfx.penguins-on-hudson.com/2010/04/06/a-practical-view-of-comcast-vs-fcc/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2010/04/06/a-practical-view-of-comcast-vs-fcc/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 23:35:09 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Business Linux]]></category>
		<category><![CDATA[News & Reviews]]></category>
		<category><![CDATA[FCC]]></category>
		<category><![CDATA[Legal]]></category>
		<category><![CDATA[Net Neutrality]]></category>
		<category><![CDATA[United States Court]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/2010/04/06/a-practical-view-of-comcast-vs-fcc/</guid>
		<description><![CDATA[One thing to note about the United States Court of Appeals for the District of Columbia Circuit decision in Comcast vs. F.C.C.&#8211; it doesn&#8217;t restrict the F.C.C.&#8216;s ability to regulate Internet services; rather, the court ruled that the broad regulatory powers enjoyed by the F.C.C. were overstepped when they told Comcast to stop discriminating against <a href='http://cdfx.penguins-on-hudson.com/2010/04/06/a-practical-view-of-comcast-vs-fcc/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>One thing to note about the <a href="http://www.cadc.uscourts.gov/">United States Court of Appeals for the District of Columbia Circuit</a>  decision in <a href="http://pacer.cadc.uscourts.gov/common/opinions/201004/08-1291-1238302.pdf" title="Comcast vs. F.C.C.">Comcast vs. F.C.C.</a>&#8211; it doesn&#8217;t restrict the <a href="http://en.wikipedia.org/wiki/FCC">F.C.C.</a>&#8216;s ability to regulate Internet services; rather, the court ruled that the <a href="http://en.wikipedia.org/wiki/FCC#Communications_Act_of_1934">broad regulatory powers</a>  enjoyed by the <a href="http://en.wikipedia.org/wiki/FCC">F.C.C.</a> were overstepped when they told <a href="http://en.wikipedia.org/wiki/Comcast#Controversies">Comcast</a>  to stop discriminating against <a href="http://en.wikipedia.org/wiki/BitTorrent_%28protocol%29">BitTorrent traffic</a> . Many individuals dismiss this as a &#8220;bad decision&#8221; of the court, but to do so ignores important issues relevant to this ruling.</p>
<p>I generally favor &#8216;net neutrality, and I certainly don&#8217;t take a kindly view of the arbitrary packet discrimination employed by unscrupulous companies; left unchecked, such practices easily (perhaps inevitably) lead to &#8220;<a href="http://www.scribd.com/doc/938752/Against-FeeBased-and-other-Pernicious-Net-Prejudice-An-Explanation-and-Examination-of-the-Net-Neutrality-Debate">the pseudo service scenario of bribery &#8230; extortion</a>&#8220;, but the same slippery slope analogy could slide the other way. Had the appellate court ruled in favor of the <a href="http://en.wikipedia.org/wiki/FCC">F.C.C.</a> it would have set a precedent for allowing a regulatory authority to essentially invent new powers not specifically delegated to it by any act of Congress. If you would prefer that Congress pass such a law, you may wish to ask your representatives to support <a href="http://www.opencongress.org/bill/111-h3458/show">H.R. 3458</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2010/04/06/a-practical-view-of-comcast-vs-fcc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automount USB drives on Ubuntu servers.</title>
		<link>http://cdfx.penguins-on-hudson.com/2010/01/20/automount-removable-devices-on-ubuntu-servers/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2010/01/20/automount-removable-devices-on-ubuntu-servers/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 01:27:19 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Business Linux]]></category>
		<category><![CDATA[Fun with F.O.S.S.]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[Automount]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/2010/01/20/automount-removable-devices-on-ubuntu-servers/</guid>
		<description><![CDATA[In most cases, Ubuntu desktop systems will automatically detect and mount removable media, and this is largely done with software that is part of the X Windows system; for server systems without X Windows however, this sort of thing requires a bit of work. Now some may ask, &#8220;Why automount removable media at all?&#8221; It <a href='http://cdfx.penguins-on-hudson.com/2010/01/20/automount-removable-devices-on-ubuntu-servers/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>In most cases, Ubuntu desktop systems will automatically detect and mount removable media, and this is largely done with software that is part of the X Windows system; for server systems without X Windows however, this sort of thing requires a bit of work.</p>
<p>Now some may ask, &#8220;Why automount removable media at all?&#8221; It is unwise to remove an active device, such as unplugging a USB drive without first unmounting it, and automounting may encourage this sort of recklessness. I don&#8217;t contend this, but if one runs a server using an external USB drive, there are two words which should spark an immediate interest in automatic mounts: <strong>power failure</strong>.<br />
<span id="more-54"></span></p>
<p>To manually mount an external USB drive, a user might enter a command such as: <span class="code">mount /dev/sdd1 /mnt/usbdrive</span>. Naturally this assumes that sdd1 is the correct device node, and that&#8217;s the thing about mounting things like USB drives&#8211; there is no guarantee which device node it will use.</p>
<p>Fortunately UDEV, which is what handles all those devices in the /dev directory, has a rules syntax to control how those device nodes are named and what happens next. I&#8217;ll explain briefly how to automount a USB drive, but readers looking for detailed information about UDEV rules should consult <a href="http://www.reactivated.net/writing_udev_rules.html">Writing udev rules</a> by Daniel Drake as well as the udev man page (<span class="code">man udev</span>).</p>
<p>Start by plugging in the device you want to mount, for these examples I have used a USB thumbdrive.  Run <span class="code">dmesg</span> and look for something like:</p>

<div class="wp_syntax"><div class="code"><pre class="io" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">6388458.851691</span><span style="color: #66cc66;">&#93;</span>  sdb: sdb1
<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">6388458.852594</span><span style="color: #66cc66;">&#93;</span> sd <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">0</span>: <span style="color: #66cc66;">&#91;</span>sdb<span style="color: #66cc66;">&#93;</span> Attached SCSI removable disk
<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">6388458.852635</span><span style="color: #66cc66;">&#93;</span> sd <span style="color: #cc66cc;">15</span>:<span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">0</span>: Attached scsi generic sg2 <span style="color: #000000; font-weight: bold;">type</span> <span style="color: #cc66cc;">0</span></pre></div></div>

<p>This tells me that the assigned device node is <span class="code">/dev/sdb1</span>. To find out more about that device, run: <span class="code">udevinfo -a -p /sys/block/sdb</span> and look for a single block of text that has a useful attribute&#8211; a single rule may only match elements from a single block. In the example below, I&#8217;ve highlighted two lines I can use in my rule:</p>
<p><code>looking at parent device '/devices/pci0000:00/0000:00:02.1/usb2/2-5/2-5.1':<br />
KERNELS=="2-5.1"<br />
<strong>SUBSYSTEMS=="usb"</strong><br />
DRIVERS=="usb"<br />
ATTRS{dev}=="189:152"<br />
<em> ... lots more ATTRS ... </em><br />
ATTRS{manufacturer}=="Prolific Technology Inc."<br />
<strong> ATTRS{product}=="USB Mass Storage Device"</strong><br />
</code></p>
<p>I now have four bits of information I can use to write a useful rule:</p>
<ul>
<li>The device node will be similar to <em>/dev/sdb1</em>, which I can match with <em>sd?1</em></li>
<li>SUBSYSTEMS==&#8221;usb&#8221;</li>
<li>ATTRS{product}==&#8221;USB Mass Storage Device&#8221;</li>
<li>I want to run <span class="code">/bin/mount</span> and mount the device at <span class="code">/mnt/usb</span></li>
</ul>
<p>After looking up the correct syntax in the man page, I wrote my rule like so:</p>

<div class="wp_syntax"><div class="code"><pre class="io" style="font-family:monospace;">KERNEL==<span style="color: #ff0000;">&quot;sd?1&quot;</span>, SUBSYSTEMS==<span style="color: #ff0000;">&quot;usb&quot;</span>, ATTRS<span style="color: #66cc66;">&#123;</span>product<span style="color: #66cc66;">&#125;</span>==<span style="color: #ff0000;">&quot;USB Mass Storage Device&quot;</span>,
↪ RUN+=<span style="color: #ff0000;">&quot;/bin/mount /dev/%k /mnt/usb&quot;</span></pre></div></div>

<p>This I saved in a file at <span class="code">/etc/udev/rules.d/10-codefix.rules</span>. The rule should be picked up automatically, but one can always run <span class="code">sudo udevcontrol reload_rules</span> or <span class="code">sudo /etc/init.d/udev reload</span>.</p>
<p>With the device attached, this rule can be tested with <span class="code">udevtest /sys/block/sdb/sdb1 usb</span>. If the rule is correct, the output of udevtest will include the mount command.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2010/01/20/automount-removable-devices-on-ubuntu-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diagnosing Sound Problems in Ubuntu Linux</title>
		<link>http://cdfx.penguins-on-hudson.com/2010/01/02/diagnosing-sound-problems-in-ubuntu-linux/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2010/01/02/diagnosing-sound-problems-in-ubuntu-linux/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 19:05:30 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Fun with F.O.S.S.]]></category>
		<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[PCM]]></category>
		<category><![CDATA[Sound Card]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Karmic]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/2010/01/02/diagnosing-sound-problems-in-ubuntu-linux/</guid>
		<description><![CDATA[Sound problems fall in to three basic categories, and the first thing you want to do is determine which one you&#8217;re dealing with. The easiest thing you can do is test your speakers with something else, using the same cable. If your speakers and cable are confirmed to be in good working order, then the <a href='http://cdfx.penguins-on-hudson.com/2010/01/02/diagnosing-sound-problems-in-ubuntu-linux/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a title="Hardware Information" href="http://cdfx.penguins-on-hudson.com/wp-content/cdfx_uploads/2010/01/hardinfo.png"><a href="http://cdfx.penguins-on-hudson.com/wp-content/cdfx_uploads/2010/01/hardinfo.png"><img class="alignright size-thumbnail wp-image-53 colorbox-52" title="Hardware Information" src="http://cdfx.penguins-on-hudson.com/wp-content/cdfx_uploads/2010/01/hardinfo.thumbnail.png" alt="" width="128" height="99" /></a></a>Sound problems fall in to three basic categories, and the first thing you want to do is determine which one you&#8217;re dealing with. The easiest thing you can do is test your speakers with something else, using the same cable. If your speakers and cable are confirmed to be in good working order, then the problem must be either:<span id="more-52"></span></p>
<p><strong>1. Defective hardware.</strong></p>
<p>If there is a working volume control in <em>Applications  Sound &amp; Video &#8680; Volume Control</em> or <em>Applications &#8680; Sound &amp; Video &#8680; AlsamixerGui</em>, or on the desktop toolbar, then defective hardware is less likely. On new installations, the case may be simply that the Master or PCM channel is muted. If no sound card is detected these controls should be &#8220;grayed out&#8221; and unusable. If the volume controls are missing or disabled (i.e. you cannot move the slider control), you can confirm the diagnosis by following the instructions in the next section, then take the machine back to the shop that sold it to you or seek assistance from a professional.</p>
<p><strong>2. Incorrectly detected hardware.</strong></p>
<p>Whether or not volume controls work, it is worthwhile to check whether and what devices have been detected by Linux.  Most Linux distributions should have the command line tool <span class="code">lspci</span> or <span class="code">lshw</span> available, however <span class="code">hardinfo</span> provides a nice graphic interface &amp; report generation. Ubuntu users can install it via the package manager or at the command line with: <code>sudo aptitude install hardinfo</code></p>
<p>The menu icon should appear in <em>Applications &#8680; System Tools &#8680; System Profiler &amp; Benchmark</em> but may also be launched with at a command line: <code>sudo hardinfo</code></p>
<p>In any case, the audio device will be listed under PCI devices. The reported device should be compared with the actual installed hardware to determine if it was correctly detected. If no audio device is listed, then this is a clear indication of missing or defective hardware.</p>
<p><strong>3. Application Issues</strong></p>
<p>If the hardware appears to be correctly identified and in good working order, the Master and PCM channels are enabled and volumes are set sufficiently high, speakers are plugged in and their volume is also turned up, and you are still unable to produce any sound in any application, professional assistance is probably in order. Those who are brave, foolish, lucky, or eager to learn can poke around online for reports of similar issues, in particular, users of Ubuntu Karmic (or any derived distributions) should check <a href="https://wiki.ubuntu.com/DebuggingSoundProblems/KarmicCaveats">Ubuntu&#8217;s Karmic Caveats</a> as well as the <a href="http://ubuntuforums.org/forumdisplay.php?f=334">Ubuntu Multimedia &amp; Video Forums</a> as many users have reported issues related to the <a title="Pulse Audio" href="https://wiki.ubuntu.com/PulseAudio">Pulse Audio</a> sound server.</p>
<p>If you&#8217;re still stuck after all the above, your best bet is to seek out your local <a title="USA Linux Groups" href="http://www.linux.org/groups/usa/">Linux User&#8217;s Group</a> where you are sure to find someone willing to help.</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2010/01/02/diagnosing-sound-problems-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Coolness &#8230; even on Windows.</title>
		<link>http://cdfx.penguins-on-hudson.com/2009/12/26/ssh-coolness-even-on-windows/</link>
		<comments>http://cdfx.penguins-on-hudson.com/2009/12/26/ssh-coolness-even-on-windows/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:21:56 +0000</pubDate>
		<dc:creator>garrison</dc:creator>
				<category><![CDATA[Tip Sheets]]></category>
		<category><![CDATA[LAN]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[Proxy Settings]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://cdfx.penguins-on-hudson.com/2009/12/26/ssh-coolness-even-on-windows/</guid>
		<description><![CDATA[prerequisite concepts: prelude, basic config., port fwd, proxy conn. I don&#8217;t often have the opportunity to experiment on computers running Windows, but every once in a long while it simply cannot be avoided. I recently found myself wanting to look up a password in Revelation, a password manager for the Gnome Desktop on Linux; I <a href='http://cdfx.penguins-on-hudson.com/2009/12/26/ssh-coolness-even-on-windows/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: right"><em>prerequisite concepts: <a href="http://blog.penguins-on-hudson.com/2008/09/25/openssh-prelude/">prelude</a>, <a href="http://blog.penguins-on-hudson.com/2008/09/26/openssh-basic-configuration/">basic config.</a>, <a href="http://blog.penguins-on-hudson.com/2008/10/16/open-ssh-port-forwarding/">port fwd</a>, <a href="http://blog.penguins-on-hudson.com/2008/10/17/openssh-proxy-connections/">proxy conn.</a><br />
</em></p>
<p>I don&#8217;t often have the opportunity to experiment on computers running Windows, but every <a href="http://openssh.org"><img src="http://codefix.files.wordpress.com/2008/10/puffy-armed.png" title="puffy-armed" class="alignright size-full wp-image-154 colorbox-51" align="right" height="170" width="200" /></a> once in a long while it simply cannot be avoided. I recently found myself wanting to look up a password in <a href="http://oss.codepoet.no/revelation/">Revelation</a>, a password manager for the Gnome Desktop on Linux; I have previously written about using <a href="http://cdfx.penguins-on-hudson.com/?p=47" title="OpenSSH: Proxy Connections">OpenSSH&#8217;s ProxyCommand</a>  directive to tunnel through a firewall and <a href="http://cdfx.penguins-on-hudson.com/?p=46" title="Open SSH: Port Forwarding">forward X11 (GUI) applications</a>  remotely from a an isolated workstation on a private LAN, the difference here was that I needed to forward that application to a Windows workstation.</p>
<p><span id="more-51"></span>I haven&#8217;t used Windows enough to do this sort of thing for about ten years, so it took a bit of fiddling, but I eventually worked out the following methodology. Like the <a href="http://cdfx.penguins-on-hudson.com/?p=41" title="OpenSSH Prelude: Requisite Knowledge">other posts in this series</a>, it is assumed that the reader is familiar with the basics, specifically the use of <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" title="PuTTY: a free telnet/ssh client">PuTTY</a> and Pageant to log in to Linux hosts using ssh keys; a windows installer is available to install all needed utilites, but the only others used in this experiment were PuTTYgen (to generate an SSH key) and plink which I simply tossed in the Windows directory so I wouldn&#8217;t need a full path in the local proxy command (below). Some additional software is needed to run X Windows applications on Windows, and in this case I used <a href="http://www.straightrunning.com/XmingNotes/" title="Xming - PC X Server">Xming</a>. I had never used Xming before, and may never need it again, but I was impressed that it was as easy as point, click, run&#8211; as long as it&#8217;s running in the background, it will do what&#8217;s needed. All the configuration is done in PuTTY.</p>
<p><a href="http://cdfx.penguins-on-hudson.com/wp-content/uploads/2009/12/putty_session.png" title="PuTTY: Session Settings"><img class="colorbox-51"  src="http://cdfx.penguins-on-hudson.com/wp-content/uploads/2009/12/putty_session.thumbnail.png" alt="PuTTY: Session Settings" align="right" height="124" width="128" /></a> <strong>Session Settings</strong><br />
A proxy connection has only a few specific settings,  all others can be left at default values or the user&#8217;s preference; this screen shot is only included to emphasize that the Session Host is the box on the private LAN running the application we want, not the proxy host which has the public Internet connection we will be using.</p>
<p><br clear="all"><a href="http://cdfx.penguins-on-hudson.com/wp-content/uploads/2009/12/putty_proxy.png" title="PuTTY: Proxy Settings"><img class="colorbox-51"  src="http://cdfx.penguins-on-hudson.com/wp-content/uploads/2009/12/putty_proxy.thumbnail.png" alt="PuTTY: Proxy Settings" align="right" height="124" width="128" /></a> <strong>Proxy Settings</strong><br />
The proxy hostname is the box  with the public connection;  it will use the local proxy command to connect our SSH client to the session host specified on the previous screen. Note that SSH will only use the Auto-login username (Connection=&gt;Data=&gt;Login Details) with the session host, which is why I have specified a username here.</p>
<p><br clear="all"><a href="http://cdfx.penguins-on-hudson.com/wp-content/uploads/2009/12/putty_x11.png" title="PuTTY: X11 Forwarding Settings"><img class="colorbox-51"  src="http://cdfx.penguins-on-hudson.com/wp-content/uploads/2009/12/putty_x11.thumbnail.png" alt="PuTTY: X11 Forwarding Settings" align="right" height="124" width="128" /></a> <strong>X11 Forwarding</strong><br />
There is nothing complicated about the  X forwarding settings, this must be enabled in PuTTy, as well as on the remote Linux box, and on the proxy. In my case, the proxy was an Ubuntu server not running X Windows, so I first had to install xauth (sudo aptitude install xauth).</p>
]]></content:encoded>
			<wfw:commentRss>http://cdfx.penguins-on-hudson.com/2009/12/26/ssh-coolness-even-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

