<?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"
	>

<channel>
	<title>Easily was a man made an infidel ...</title>
	<atom:link href="http://www.alan-watson.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alan-watson.org</link>
	<description>Alan Watson's Web Site and Occasional Blog</description>
	<pubDate>Wed, 19 Nov 2008 23:38:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>On Using Meerkat to Work on Remote Hosts Behind Firewalls</title>
		<link>http://www.alan-watson.org/2008/11/on-using-meerkat-to-work-on-remote-hosts-behind-firewalls/</link>
		<comments>http://www.alan-watson.org/2008/11/on-using-meerkat-to-work-on-remote-hosts-behind-firewalls/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 03:42:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ExpanDrive]]></category>

		<category><![CDATA[Mac OS]]></category>

		<category><![CDATA[Meerkat]]></category>

		<category><![CDATA[SSH/SFTP]]></category>

		<guid isPermaLink="false">http://www.alan-watson.dreamhosters.com/?p=22</guid>
		<description><![CDATA[I&#8217;ve written about using ExpanDrive to work with files on remote hosts from Mac OS.
I work on a number of hosts that are protected behind firewalls and have to be accessed from a bastion host. In my examples, I will assume the bastion host is called bastion.external and the protected host is called protected.internal. In order to log in to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written about using <a href="/on-using-expandrive-to-work-on-remote-file-systems/">ExpanDrive</a> to work with files on remote hosts from Mac OS.</p>
<p>I work on a number of hosts that are protected behind firewalls and have to be accessed from a bastion host. In my examples, I will assume the bastion host is called bastion.external and the protected host is called protected.internal. In order to log in to the protected host, I need to log in to the bastion host and then once again into the protected host:</p>
<blockquote><p>ssh -A bastion.external ssh protected.internal</p></blockquote>
<p>SSH can handle this fine, especially with password-less authentication. You can also configure your .ssh/config file <a href="http://www.hackinglinuxexposed.com/articles/20040830.html">to use netcat to bounce the connection</a> straight from the bastion host to the protected host.</p>
<p><span style="line-height: 12px;">The problem is that ExpanDrive cannot access the protected host, and working on remote hosts without ExpanDrive is unpleasant.</span></p>
<p>So, let&#8217;s solve this using SSH port forwarding. We will forward port 50022 in the local host to port 22 on the protected host using:</p>
<blockquote><p>ssh -N bastion.external -L 50022:protected.internal:22</p></blockquote>
<p>Once we have done this, connections on port 50022 on the local host are forwarded to port 22 (the standard SSH port) on the protected host. The local port number does not have to be 50022, but it&#8217;s a private port and a good mnemonic for the standard SSH port.</p>
<p>We can now use SSH to connect to the protected host via the local port:</p>
<blockquote><p>ssh localhost -p 50022</p></blockquote>
<p>We can also access the file system on the protected host using ExpanDrive. We simply use localhost for the server and specify the appropriate local port (50022 in this example).</p>
<p>If we need access to more than one protected host, we simply forward a different local port for each.</p>
<p>Now, this is all well and good, but setting up forwarded ports and remembering port numbers is a bit messy. Let&#8217;s clean up things up.</p>
<p>First, we will use <a href="http://codesorcery.net/meerkat">Meerkat</a> to automatically handle port forwarding. In Meerkat we configure accounts on each bastion host and forwarded ports (or “tunnels”) on each account. We arrange for Meerkat to open at login. Meerkat works seamlessly with Keychain Access to provide password-less authentication. Meerkat is not perfect; it does not automatically maintain connections when local computer sleeps. Meekat costs $20 and is available with a 14-day trial licence.</p>
<p>Second, we will add the following lines to .ssh/config to configure an alias for the protected host:</p>
<blockquote><p>Host protected</p>
<p>    Hostname localhost</p>
<p>    Port 50022</p></blockquote>
<p>Once we have done this, SSH, SCP, SFTP, and RSYNC know that the alias refers to the correct port on the local host. We can enter the protected host simply using</p>
<blockquote><p>ssh protected</p></blockquote>
<h3><span style="font-weight: normal;">Notes</span></h3>
<p>There are alternatives to Meerkat. However, I found <a href="http://www.sshkeychain.org/">SSHKeychain</a> to be unstable and both <a href="http://www.macserve.org.uk/projects/issh/">iSSH</a> and <a href="http://projects.tynsoe.org/en/stm/index.php">SSH Tunnel Manager</a> do not appear to support password-less authentication.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alan-watson.org/2008/11/on-using-meerkat-to-work-on-remote-hosts-behind-firewalls/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On Using ExpanDrive to Work on Remote File Systems</title>
		<link>http://www.alan-watson.org/2008/10/on-using-expandrive-to-work-on-remote-file-systems/</link>
		<comments>http://www.alan-watson.org/2008/10/on-using-expandrive-to-work-on-remote-file-systems/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 05:54:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ExpanDrive]]></category>

		<category><![CDATA[Mac OS]]></category>

		<category><![CDATA[SSH/SFTP]]></category>

		<guid isPermaLink="false">http://www.alan-watson.org/?p=41</guid>
		<description><![CDATA[My main computer is a Mac, but I do a fair amount of work on several remote hosts. SSH in Terminal is great for running commands, but what about working with files?
I could use the standard Unix tools on the remote host (possibly running the X11 server locally), but I bought a Mac precisely to [...]]]></description>
			<content:encoded><![CDATA[<p>My main computer is a Mac, but I do a fair amount of work on several remote hosts. SSH in Terminal is great for running commands, but what about working with files?</p>
<p>I could use the standard Unix tools on the remote host (possibly running the X11 server locally), but I bought a Mac precisely to get away from these. And the “standard” Unix tools have subtle (and not so subtle) differences on the remote hosts I use.</p>
<p>I could use <a href="http://cyberduck.ch/">CyberDuck</a>, or another SFTP client, but I then would have to download files, work on them locally, and upload them again.</p>
<p>I could use some application-specific partial solutions, for example, using <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> to edit remote files using SFTP, but application-specific partial solutions are not general solution; TextWrangler can’t help me open a remote PDF file in Preview.</p>
<p>I’m now using <a href="http://www.magnetk.com/expandrive">ExpanDrive</a> to mount the remote filesystem and use my standard Mac OS tools. ExpanDrive accesses the remote file system using SFTP rather than AFS, NFS, or SAMBA and presents the remote filesystem as a standard device that can be seen by the Finder and all of the local Mac OS applications. </p>
<p>ExpanDrive works seamlessly with the Keychain to provide password-less authentication and does not drop the connections when my computer sleeps. As far as accessing my remote files is concerned, it is tantamount to a light-weight and easily configurable VLAN.</p>
<p><a href="http://www.magnetk.com/expandrive">ExpanDrive</a> costs $29 and is available with a 30-day trial period.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alan-watson.org/2008/10/on-using-expandrive-to-work-on-remote-file-systems/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On Keeping the 404s at Bay</title>
		<link>http://www.alan-watson.org/2008/10/on-keeping-the-404s-at-bay/</link>
		<comments>http://www.alan-watson.org/2008/10/on-keeping-the-404s-at-bay/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 23:12:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.alan-watson.dreamhosters.com/?p=13</guid>
		<description><![CDATA[One would have expected WordPress to handle an empty blog with more style.
]]></description>
			<content:encoded><![CDATA[<p>One would have expected WordPress to handle an empty blog with more style.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alan-watson.org/2008/10/on-keeping-the-404s-at-bay/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
