<?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>Macintosh-Admin &#187; Tutorials/Guides</title>
	<atom:link href="http://www.macintosh-admin.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.macintosh-admin.com</link>
	<description>The resource for Macintosh administrators...</description>
	<lastBuildDate>Tue, 08 Jun 2010 08:56:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Creating a Subversion Repository on OS X Server</title>
		<link>http://www.macintosh-admin.com/2010/06/08/creating-a-subversion-repository-on-os-x-server/</link>
		<comments>http://www.macintosh-admin.com/2010/06/08/creating-a-subversion-repository-on-os-x-server/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 08:56:59 +0000</pubDate>
		<dc:creator>jimmy</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/?p=314</guid>
		<description><![CDATA[I often find myself creating subversion repositories on my OS X Server. I&#8217;ve actually designated my OS X Server to be my Subversion server since Apple has been kind of enough to include the necessary software right out of the box. This applies to both OS X Leopard and Snow Leopard Server. I also find [...]]]></description>
			<content:encoded><![CDATA[<p>I often find myself creating subversion repositories on my OS X Server. I&#8217;ve actually designated my OS X Server to be my Subversion server since Apple has been kind of enough to include the necessary software right out of the box. This applies to both OS X Leopard and Snow Leopard Server. I also find that each time I find myself going back to this one website which includes instructions on how to get it all working. Rather then write our own guide I figured it would be just as easy to link you all to the site I use instead:</p>
<p><a href="http://agileshrugged.com/blog/?p=14">Subversion on OS X Leopard Server</a></p>
<p>It&#8217;s pretty simple to follow, basically you just use the svnadmin command to create the actual repository, then you need to activate a couple modules for Apache via Server Admin, then create a realm, and voila! One thing I do different from the guide, is that I create all my repositories in /usr/local/svn/ instead of /usr/local/. This is really just a personal preference thing, however my main reason is for neatness. I like to keep things organized. You of course can create the repositories where ever you&#8217;d like, even in your home folders if that&#8217;s your thing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2010/06/08/creating-a-subversion-repository-on-os-x-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disk Utility Broken in 10.6.3 &#8211; Fixing Degraded RAID Sets</title>
		<link>http://www.macintosh-admin.com/2010/05/26/disk-utility-broken-in-10-6-3-fixing-degraded-raid-sets/</link>
		<comments>http://www.macintosh-admin.com/2010/05/26/disk-utility-broken-in-10-6-3-fixing-degraded-raid-sets/#comments</comments>
		<pubDate>Wed, 26 May 2010 08:41:03 +0000</pubDate>
		<dc:creator>jimmy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/?p=310</guid>
		<description><![CDATA[Back in 2008 I wrote an article which discussed how one can recover from a degraded mirror RAID-array. Unfortunately it looks like this issue may have popped backup within Disk Utility and still requires one to use the command line version of Disk Utility to correct the issue. One of our readers Matt S. of [...]]]></description>
			<content:encoded><![CDATA[<p>Back in <a href="http://www.macintosh-admin.com/2008/03/21/software-raid-in-os-x-leopard/#com">2008 I wrote an article which discussed</a> how one can recover from a degraded mirror RAID-array. Unfortunately it looks like this issue may have popped backup within Disk Utility and still requires one to use the command line version of Disk Utility to correct the issue. One of our readers Matt S. of <a href="panoramaproductions.biz">Panorama Productions &#038; Digital Services</a> found this out and was kind enough to allow us to re-publish his findings.</p>
<p>&#8212;&#8211;</p>
<blockquote><p>Unfortunately, my experience today does not support the conclusion that Apple has fixed the GUI in the Disk Utility included with OS 10.6.3.</p>
<p>I was forced to rely on the command line to add a replacement disk to a degraded RAID-1 because no amount of dragging and dropping in the DU window worked. The drag-and-drop would not place the replacement drive within the existing RAID set and the rebuild button never became active.</p>
<p>But the process was simpler than your prior description.</p>
<p>Wanting to take no chances with the data, I first cloned the data off the degraded RAID from the operating drive with Carbon Copy Cloner. In fact, I cloned it twice, to two different drives. Better safe than sorry.</p>
<p>I installed a new, replacement drive of equal capacity to the operating drive in my MacPro and initialized it as a single partition with a unique and easily identifiable name.</p>
<p>Using the command line in Terminal, I used the command &#8220;diskutil list&#8221; to get the disk numbers of all the disks installed in my MacPro.</p>
<p>Then, with no other commands necessary, I entered:</p>
<p><code>diskutil repairMirror disk4 disk0</code></p>
<p>Disk4 is the disk ID of the degraded RAID-1<br />
Disk0 is the disk ID of the new drive</p>
<p>This command re-initialized the freshly initialized new disk I installed (called disk0), added it to RAID with the new name &#8220;RAID Slice disk0s2&#8243;, removed the name of the previously missing, failed member of the RAID-1, and automatically began rebuilding the array.</p>
<p>Much more efficient to type one command to do it all but I would rather that the GUI-based disk utility function as it should. It would be much more intuitive &#8211; and isn&#8217;t that what Apple products are supposed to be about?</p></blockquote>
<p>&#8212;&#8211;</p>
<p>Matt also followed up to my email to which I had asked a few questions.</p>
<p>&#8212;&#8211;</p>
<blockquote><p>The failed drive was NOT the boot drive.</p>
<p>I was NOT using the OSX 10.6.3 Install DVD as my boot disk. I was booted from my 10.6.3 normal boot hard drive.</p>
<p>And one other thing. I purposely and deliberately screwed up my RAID-1 just to see whether, in fact, Apple did fix the DU GUI. The drive itself did not go bad. I just wanted to experiment and I&#8217;m glad that I did. After the RAID rebuilt with the replacement drive perfectly in 4 hours, I deliberately failed the RAID again by removing the replacement drive and reinserting the original drive. I used the same command again and the original drive was reitialized and resynced to the still functioning drive just fine, only that took 7 hours. The only difference? My original drives are Seagate 1-TBs. The replacement test drive that I used was a borrowed WD RE3 1TB model. I think I&#8217;ll get four of those puppies! I guess there&#8217;s nothing like having two processing chips in a hard drive to almost halve the write times.</p>
<p>By all means, feel free to publish my comments. I wrote to you specifically to share my experience with you and your readers. The more all of us share our knowledge, the easier it becomes for other folks.</p>
<p>Best wishes,</p>
<p>Matt S.</p></blockquote>
<p>That said, I&#8217;d like to myself try replicating the issue just to verify that once again the Disk Utility in 10.3.6 is broken. It&#8217;s too bad because it&#8217;s a lot easier to just drag and drop and new disk into Disk Utility rather then having to run through the command line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2010/05/26/disk-utility-broken-in-10-6-3-fixing-degraded-raid-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing &#8216;unrar&#8217; on Mac OS X Server</title>
		<link>http://www.macintosh-admin.com/2009/08/31/installing-unrar-on-mac-osx-server/</link>
		<comments>http://www.macintosh-admin.com/2009/08/31/installing-unrar-on-mac-osx-server/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 19:53:19 +0000</pubDate>
		<dc:creator>jimmy</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/?p=188</guid>
		<description><![CDATA[I&#8217;ve been having a lot of trouble unraring several larger (5+GB) files with TheUnarchiver and RARExpander GUI applications so I generally always just moved the rar&#8217;d files over to my Linux machine and run unrar on there and then move it back over, obviously one step to many! Fortunately you can easily install the unrar [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having a lot of trouble unraring several larger (5+GB) files with TheUnarchiver and RARExpander GUI applications so I generally always just moved the rar&#8217;d files over to my Linux machine and run unrar on there and then move it back over, obviously one step to many!</p>
<p>Fortunately you can easily install the unrar application on your server or even just normal OS X client. Visit the <a href="http://www.rarlab.com/">RARLab website</a> and go into their downloads section. There is one download which is Command Line Only and made for Mac OS X. Download that and then uncompress it. You should have a new folder called &#8216;rar&#8217;. While in command line navigate into that folder and run:</p>
<p><code>sudo install -c -o yourusername unrar /bin</code></p>
<p>This will install the binaries needed into the correct places. Now since my normal everyday account isn&#8217;t an account with administrator privileges I first had switch to one that was and then ran that command. Once completed (the install should take a few seconds if that) you can test it out by running:</p>
<p><code>unrar</code></p>
<p>If you&#8217;re shown a list of options then it worked!</p>
<p>I&#8217;m not really sure as to why GUI applications have trouble unraring large sized files, but unrar seems to be able to handle them just fine!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2009/08/31/installing-unrar-on-mac-osx-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Trac in Mac OS X Leopard Server</title>
		<link>http://www.macintosh-admin.com/2009/08/27/installing-trac-in-mac-os-x-leopard-server/</link>
		<comments>http://www.macintosh-admin.com/2009/08/27/installing-trac-in-mac-os-x-leopard-server/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 20:07:07 +0000</pubDate>
		<dc:creator>jimmy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/?p=49</guid>
		<description><![CDATA[Recently I&#8217;ve decided to dedicate one of my Mac OS X Server boxes to be a Subversion server. Now Subversion itself is great and there&#8217;s already a few GUI applications for OS X (Versions.app and Coda for example) that can help you view your Subversion repository quite easily. But what if you don&#8217;t have a [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve decided to dedicate one of my Mac OS X Server boxes to be a Subversion server. Now Subversion itself is great and there&#8217;s already a few GUI applications for OS X (Versions.app and Coda for example) that can help you view your Subversion repository quite easily. But what if you don&#8217;t have a wonderful application like Versions or Coda, or you&#8217;re on Windows or Linux for that matter?</p>
<p>Trac is an excellent answer and solution to that question. Trac is a web based front-end to subversion and much more (I only use it for viewing and comparing code changes visually). Straight from the <a href="http://trac.edgewall.org/">Trac website</a>:</p>
<blockquote><p>Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. Our mission is to help developers write great software while staying out of the way. Trac should impose as little as possible on a team&#8217;s established development process and policies.</p>
<p>It provides an interface to  Subversion (or other version control systems), an integrated Wiki and convenient reporting facilities. Trac allows wiki markup in issue descriptions and commit messages, creating links and seamless references between bugs, tasks, changesets, files and wiki pages. A timeline shows all current and past project events in order, making the acquisition of an overview of the project and tracking progress very easy. The roadmap shows the road ahead, listing the upcoming milestones.</p></blockquote>
<p>So how about getting it installed in OS X? It&#8217;s really really simple!</p>
<p>First, check to see which version of Python you have installed. You can do this by:</p>
<p><code>python --version</code></p>
<p>You should be okay, but just make sure you have at least version 2.3. I had version 2.5 which most people will have.</p>
<p>Next, download a copy of setuptools. You can visit this page:</p>
<p>http://pypi.python.org/pypi/setuptools#downloads</p>
<p>and snag &#8216;setuptools-0.6c9-py2.5.egg&#8217;. Although depending on which version of Python you get, make sure you get the right setuptool installer. Now, mine downloaded as setuptools-0.6c9-py2.5.egg.sh, I just removed the &#8216;.sh&#8217; bit so it was just &#8216;setuptools-0.6c9-py2.5.egg&#8217;. Now, run this script as you would a shell script:</p>
<p><code>sudo sh ./setuptools-0.6c9-py2.5.egg</code></p>
<p>This will install a really fantastic thing called &#8216;easy_install&#8217;. Now, to actually install Trac, type in:</p>
<p>sudo easy_install Trac</p>
<p>BAM! You&#8217;re pretty much done if no error messages come up. A really good thing to see is &#8216;installed tracd to /usr/local/bin/&#8217;. Make sure you run the command with sudo since it&#8217;ll be install some pieces into areas normally restricted to non-admin accounts.</p>
<p>Once completed you can make yourself a Trac environment by typing in:</p>
<p><code>sudo trac_admin /path/to/trac/project initenv</code><br />
ex. <em>sudo trac_admin /usr/local/trac/myproject initenv</em></p>
<p>This will add a new Trac project to your server. To start up the Trac server use:</p>
<p>sudo tracd -p 81 /usr/local/trac/myproject</p>
<p>You can now open a web browser and browse to http://127.0.0.1:81 and you should see your project listed!</p>
<p>Now let me breakdown that command to startup tracd. &#8216;tracd&#8217; is the server binary, so you obviously need that, the -p 81 means it&#8217;ll run on port 81, I chose 81 since my webserver is using port 80 already and then I give the path to the project I want hosted. Do note, you can list multiple project paths, I have about 7-8 listed in my startup command.</p>
<p>By default tracd will only listen on your local loopback IP address (127.0.0.1) which is nice if you only need to access it locally but I am 2000 miles from my server so I need to access it externally. This can easily be accomplished by using the &#8216;&#8211;hostname=&#8217; parameter.</p>
<p>This should pretty much cover a basic Trac install on OS X Server. Beyond this, you can create a LaunchDaemon for tracd so that it starts when your server starts and something very important is authentication and permissions. I haven&#8217;t gone into detail on either of those items in this article, but if anyone is interested, I&#8217;d be more then willing to share that information! I highly recommend checking out the <a href="http://trac.edgewall.org/wiki/TracInstall">Trac website as well</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2009/08/27/installing-trac-in-mac-os-x-leopard-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPN Server with a Public IP Only</title>
		<link>http://www.macintosh-admin.com/2008/04/21/vpn-server-with-a-public-ip-only/</link>
		<comments>http://www.macintosh-admin.com/2008/04/21/vpn-server-with-a-public-ip-only/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 12:10:54 +0000</pubDate>
		<dc:creator>jimmy</dc:creator>
				<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/?p=8</guid>
		<description><![CDATA[Previous to my switching over to a Mac Mini for my Apple servers I used Xserves which had dual Ethernet ports. This allowed for a external public IP and an internal private IP address. This of course if the optimal setup for creating a VPN when using Mac OS X Server. Initially I had thought [...]]]></description>
			<content:encoded><![CDATA[<p>Previous to my switching over to a Mac Mini for my Apple servers I used Xserves which had dual Ethernet ports. This allowed for a external public IP and an internal private IP address. This of course if the optimal setup for creating a VPN when using Mac OS X Server.</p>
<p>Initially I had thought I had setup my VPN correctly, as I was able to connect to it, although after looking at some websites and AFP shares from the server, I wasn&#8217;t getting the results I had wanted.</p>
<p>Unfortunately after checking my IP when I was on the web, I noticed it was still using my non-VPN IP which meant all my web traffic was not going through the VPN. I then tried to connect to some AFP shares, and they worked, but after looking in Server Admin, I was still connecting with my Verizon IP address, and not the IP from the VPN.</p>
<p>Speaking with my <a href="http://www.makkintosshu.com">good friend</a> we figured out that the IP blocks couldn&#8217;t be the same. I was dishing out 192.168.1.x from the VPN and my local network was also dishing out that same block. I also had to make sure I had &#8220;Send all traffic through VPN&#8221; was switched on. This parameter can be found in System Preferences >> Network >> VPN Connection&#8217;s Advanced button >> and under the Session section. It&#8217;s turned off by default but make sure it&#8217;s turned on.</p>
<p>Now for the IP block that the VPN dishes out, I changed that to something a bit more secure, something that normal home routers don&#8217;t dish out. I chose 192.168.10.x, which I&#8217;ve yet to see a DHCP/home router dish out. I would think you might find that block in a bigger organization, but it should be safe to use. Saved that setting and then I tried to connect. Unfortunately, it didn&#8217;t work right just yet.</p>
<p>Then I added a virtual interface to the single Ethernet port and assigned it an IP address within the range that the VPN server was handing out. I gave it the router address of my public IP and then tried to connect again.</p>
<p>It worked! So in summary, when you&#8217;ve got a server with a single Ethernet port and an external IP address, it&#8217;s a good idea to:</p>
<ol>
<li>Give it a virtual interface</li>
<li>Change the block range of IPs your VPN hands out</li>
<li>Give your virtual interface an IP from that range</li>
<li>Make sure your client(s) have the &#8220;Send all traffic through VPN&#8221; turned on. Security is good :)</li>
<li>Verify that it&#8217;s working correctly by visiting <a href="http://www.FindMyIP.com">FindMyIP.com</a> and looking in Server Admin</li>
</ol>
<p>I&#8217;ve also allowed people to connect to the AFP service ONLY if they&#8217;re coming from the VPN IP range, which is much more secure then letting everyone connect to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2008/04/21/vpn-server-with-a-public-ip-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software RAID In OS X Leopard</title>
		<link>http://www.macintosh-admin.com/2008/03/21/software-raid-in-os-x-leopard/</link>
		<comments>http://www.macintosh-admin.com/2008/03/21/software-raid-in-os-x-leopard/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 16:45:54 +0000</pubDate>
		<dc:creator>Jimmy</dc:creator>
				<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/2008/03/21/software-raid-in-os-x-leopard/</guid>
		<description><![CDATA[I really enjoy how easy Tiger and Leopard makes setting up RAIDs. A RAID is essentially a collection of hard drives connected together. There are multiple RAID types but I generally stick with the mirror RAID type as it works well for my purposes. To the point, one of the two drives in my mirror [...]]]></description>
			<content:encoded><![CDATA[<p>I really enjoy how easy Tiger and Leopard makes setting up RAIDs. A RAID is essentially a collection of hard drives connected together. There are <a href="http://en.wikipedia.org/wiki/RAID">multiple RAID types</a> but I generally stick with the mirror RAID type as it works well for my purposes.</p>
<p>To the point, one of the two drives in my mirror RAID failed. It made those tell tale clicking noises and wouldn’t mount at all. I opened up Disk Utility and sure enough it reported that my RAID was degraded. A day or two later I had bought a new hard drive to replace the failed one. I connected it up to my system and opened up Disk Utility again. I added the new drive (a simple drag and drop) into my degraded RAID and clicked on ‘rebuild’. Within a few seconds I was told that the ‘filesystem was unrecognized’ and the RAID could not be rebuilt. After trying again multiple times, I was prompted with that lovely message each time.</p>
<p>Being that I had about 450GBs of data on that RAID set I wasn’t about to give up so easily. I search Google for the exact error message that I was getting. I came across 2 good sources.</p>
<p>First was <a href="http://lists.apple.com/archives/macos-x-server/2007/Nov/msg00530.html">this thread</a> in the Apple mailing lists. Apparently it’s a known bug. Great. Unfortunately the site didn’t seem to provide any solution for fixing the degraded RAID set.</p>
<p>The second link was to the <a href="http://discussions.apple.com/thread.jspa?threadID=1212964&#038;tstart=0">Apple discussion boards</a>. A few posts down a user posted a solution that worked and was confirmed working by following posts by other users. With only 450GBs of data to loose I thought I’d just give it a shot!</p>
<p>So a few days later I came back with my Leopard install disk and booted the machine off that. I opened up a terminal window and used the following commands (<a href="http://discussions.apple.com/message.jspa?messageID=5782396#5782396">taken right from the post</a>):</p>
<ul>
<li>diskutil list (to find the partition that is going to be added)</li>
<li>diskutil checkRAID (to get the RAID UUID)</li>
<li>diskutil addToRAID</li>
<li>diskutil checkRAID (to watch the rebuild)</li>
<li>diskutil removefromRAID (to remove the “Failed” drive once the rebuild is done)</li>
</ul>
<p>12-13 hours later my RAID had been rebuilt and worked just great! It’s too bad that Disk Utility isn’t working the way it should, although I could have sworn that I read something about 10.5.1 including a fix so that it works the way it should, and doesn’t return the ‘unrecognized filesystem’ error. Either way, if you have a degraded RAID system and are receiving that error when trying to rebuild it, the previous steps should get you back on track.</p>
<p>Of course if you’ve got some really important data and aren’t too daring, and use a mirror RAID, I recommend copying all the data to another drive, purchase a new drive for the RAID set, destroying the current set and then creating it again with the new drive. Then copy the data back over.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2008/03/21/software-raid-in-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Creating Shared Host Keys</title>
		<link>http://www.macintosh-admin.com/2008/03/21/creating-shared-host-keys/</link>
		<comments>http://www.macintosh-admin.com/2008/03/21/creating-shared-host-keys/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 14:27:04 +0000</pubDate>
		<dc:creator>Jimmy</dc:creator>
				<category><![CDATA[Tutorials/Guides]]></category>

		<guid isPermaLink="false">http://www.macintosh-admin.com/2008/03/21/creating-shared-host-keys/</guid>
		<description><![CDATA[This is an article aimed at mostly system administrators and people that use SSH on a daily basis to connect to remote clients and servers. I myself have been wanting to set this up for quite some time and now I&#8217;ve found the time and need too! I currently have multiple servers each running several [...]]]></description>
			<content:encoded><![CDATA[<p>This is an article aimed at mostly system administrators and people that use SSH on a daily basis to connect to remote clients and servers. I myself have been wanting to set this up for quite some time and now I&#8217;ve found the time and need too! I currently have multiple servers each running several various services. I plan on setting it up so that when one server makes a backup of a few databases it can automatically connect to another server and upload the backups there for safe keeping. While it sounds semi-complicated, especially when trying to get the servers talk to each other without any user interaction, it&#8217;s not all that bad!</p>
<p>In order to get the servers to talk to each other without having me type in usernames and passwords I&#8217;ll be creating special &#8220;keys&#8221; that allow them to talk without user intervention!</p>
<p>In our example I have Server1 which makes the actual backups of my databases, on Server2 I have a nice RAID setup so I can keep my backups safe and secure! Server2 is where I want to put Server1&#8242;s backup files. Also the user I am using for an example on Server1 is jimmy and on Server2 it is jimmy2. Hopefully it&#8217;s not too confusing!</p>
<p>On Server1 I will open up a Terminal and type in:</p>
<p><code>ssh-keygen -t<br />
rsa</code></p>
<p>It will ask you where you want to save the key (usually something like /Users/your-username/.ssh/) &#8211; just hit enter here. It will then ask you to input a passphrase, just hit here and again when it asks you to &#8216;enter in the same passphrase&#8217;. It will then spit out something like:</p>
<p>Your identification has been saved in /Users/jimmy/.ssh/id_rsa.<br />
Your public key has been saved in /Users/jimmy/.ssh/id_rsa.pub.<br />
The key fingerprint is: 88:99:60:ee:eb:e5:ac:1f:fb:fe:ae:83:5c:3c:c4:0b jimmy@mycomputer</p>
<p>Perfect!</p>
<p>Now we need to put this special key onto the machine you want to remotely connect too, in this case Server2.</p>
<p>What I did was use rsync:</p>
<p><code>rsync -avz /Users/jimmy/.ssh/id_rsa.pub<br />
jimmy@ip-address-of-Server2:/Users/jimmy2/.ssh/</code></p>
<p>This bit:</p>
<p><code>rsync -avz /Users/jimmy/.ssh/id_rsa.pub</code></p>
<p>Will sync the file &#8216;id_rsa.pub&#8217; from Server1 to the user account of &#8216;jimmy2&#8242; on Server2. It will put that file into:</p>
<p><code>/Users/jimmy2/.ssh/</code></p>
<p>So now you can SSH into Server2, you will still be prompted for a password. Go into the .ssh directory for the user you synced the id_rsa.pub file too, in this example the user is jimmy2:</p>
<p><code>cd<br />
~/.ssh/</code></p>
<p>Now type:</p>
<p><code>mv id_rsa.pub authorized_keys</code></p>
<p>You can even copy and paste that command. That command will just rename the<br />
id_rsa.pub file to &#8216;authorized_keys&#8217;.</p>
<p>Now if all went well you can SSH from Server1 to Server2 and not be prompted for a password! This is a really excellent technique for moving files such as backups or when making mirror(s) of a website and not needing to input the password to the server(s) each time!</p>
<p>A note of warning though! If you remember when we were making our special key it prompted to input a passphrase, the passphrase makes your key more secure, but it will prompt you for that passphrase every time you want to connect defeating the purpose of this exercise. You should also keep track of which servers/clients can connect to each other without a password.</p>
<p>It&#8217;s also possible to get Server2 to go into Server1 without requiring a password. Follow the same steps to create the key, I renamed it to id_rsa2.pub and then used rsync to move it to Server1. Then I just renamed it authorized_keys using the above &#8216;mv&#8217; command.</p>
<p>Good luck!</p>
<p>I used this website to help me:<br />
<a  href="http://ammonlauritzen.com/blog/index.php/2006/04/16/shared_key_ssh_authentication">http://ammonlauritzen.com/blog/index.php/2006/04/16/shared_key_ssh_authentication</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.macintosh-admin.com/2008/03/21/creating-shared-host-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
