
<?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>Matt Rude &#187; FreeNAS</title>
	<atom:link href="http://mattrude.com/tag/freenas/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattrude.com</link>
	<description>Matt Rude’s Personal Website</description>
	<lastBuildDate>Thu, 15 Jul 2010 15:34:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Run a Secure git Repository on FreeNAS</title>
		<link>http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/</link>
		<comments>http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 00:31:38 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1975</guid>
		<description><![CDATA[Running a secure git repository on FreeNAS is pretty straight forward, once you understand what your trying to do.  If you have looked over my previous post &#8220;Creating a secure Git repository server&#8221; you understand that all you really need to do is connect to the git repository via ssh/ssl and copy back what you need.  The hardest part of using FreeNAS is creating the keys. To start out, you need to create a user account on the FreeNAS system. ...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (21.4372)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (21.1919)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (16.3136)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (14.9748)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (14.374)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Running a secure git repository on <a href="http://freenas.org/freenas" target="_blank">FreeNAS</a> is pretty straight forward, once you understand what your trying to do.  If you have looked over my previous post &#8220;<a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Creating a secure Git repository  server</a>&#8221; you understand that all you really need to do is connect to the git repository via ssh/ssl and copy back what you need.  The hardest part of using FreeNAS is creating the keys.</p>
<p>To start out, you need to create a user account on the FreeNAS system.  This will be a generic account that everyone who has write access will use.  You may also create a account for each person, and grant each of them access to the central repository.</p>
<p>After you have your account, follow my post on &#8220;<a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/">Enable SSH Key Authorization on  FreeNAS</a>&#8221; to copy over the SSL key and setup the account.  Once you are able to log in as your FreeNAS git user, you may follow my previous post &#8220;<a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Creating  a secure Git repository  server</a>&#8221; to setup the git repository.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (21.4372)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (21.1919)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (16.3136)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (14.9748)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (14.374)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable SSH Key Authorization on FreeNAS</title>
		<link>http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/</link>
		<comments>http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 23:06:36 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1882</guid>
		<description><![CDATA[FreeNAS is a powerful tools for archive data and other long-term storage requirements. Recently I have started backing up this and other off-site servers to one of my local FreeNAS boxes. Since these systems are only connected via the insecure internet (no VPN), I decided to transmit the backup files via SSH using SCP.  In order to do this without having to enter my password in for each and every backup (most of which happen while I&#8217;m hopeful sleeping), I...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (21.5102)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (17.4435)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (10.7403)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (8.08356)--></li>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (7.69155)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>FreeNAS is a powerful tools for archive data and other long-term storage requirements. Recently I have started backing up this and other off-site servers to one of my local FreeNAS boxes. Since these systems are only connected via the insecure internet (no VPN), I decided to transmit the backup files via SSH using SCP.  In order to do this without having to enter my password in for each and every backup (most of which happen while I&#8217;m hopeful sleeping), I needed to implement SSH Key Authorization on the receiving FreeNAS box.</p>
<p>To do this first I needed to create a DSA key pair on a different system.  On my Fedora 12 laptop I ran</p>
<pre>ssh-keygen -t dsa</pre>
<p>The trick here is to not create your new key pair in the default directory of &#8220;~/.ssh/&#8221; but in a temporary directory instead. So when it asks you.</p>
<pre>Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):</pre>
<p>Enter a different file in witch to save the key in.  Note this is asking for the name of a file, not the name of the directory, it will also create a .pub file, this is the public key for the above private key.</p>
<p>Now that you have a public/private key for the FreeNAS box, if you don&#8217;t already you need to create one for the user that you plan on sending the file from.  Just follow the above command, but this time, you may just hit enter all the way threw leaving all options as default.</p>
<p>Next, go to your FreeNAS web-page control panel, If you don&#8217;t already have one, you will need to create a user on your FreeNAS box for you to connect to.  You may do this via &#8220;Access -&gt; User and Groups&#8221; from the black bar on the top of the page.</p>
<p>Now from the top (black) bar go to &#8220;Services -&gt; SSH&#8221;</p>
<p>On your Services|SSH page, first make sure the service is enabled (top right hand corner). Once it is you will be able to change the below options.</p>
<ul>
<li><strong>TCP Port:</strong> The default (port 22) is fine in most cases, but note if you change it, you must use the new port for all connections.</li>
<li><strong>Permit root login:</strong> My option is that the root account should never be allowed to log in via a remote process.  You should set your system up correctly where this is not needed.</li>
<li><strong>Password authentication:</strong> For now this must be enabled (checked), once you have set &#8220;Key Authorization&#8221; up, you may disable this option.</li>
<li><strong>TCP forwarding:</strong> Disabled (unchecked)</li>
<li><strong>Compression:</strong> Enabled (checked)</li>
<li><strong>Private Key:</strong> This will be were we put the private key created above.  All you need to do is copy and paste.</li>
<li><strong>Extra options:</strong> Blank</li>
</ul>
<p>After you have made your changes, &#8220;Save and Restart&#8221; the service.</p>
<p>On your local system, you need to copy the content of the local users public (~/.ssh/username.pub) key file to a new file named &#8220;authorized_keys&#8221; <em>(Note: this is not the file we created for FreeNAS but the file we created for your local account)</em>.  This is the file that will need to be copied to your FreeNAS box.</p>
<p>Now that you have all the needed bits, we need to log into your FreeNAS server and create a &#8220;.ssh&#8221; directory to store the &#8220;authorized_keys&#8221; file.  To log in to the FreeNAS box interactively run a command similar too.</p>
<pre>ssh freenasuser@freenasaddress</pre>
<p>Or if you changed the &#8220;TCP Port&#8221; above, your command will look like this:</p>
<pre>ssh -P freenasport freenasuser@freenasaddress</pre>
<p>Once your logged in, you need to create the directory, by doing.</p>
<pre>mkdir ~/.ssh</pre>
<p>After you have successfully created your directory, you may exit out of your FreeNAS box for the next step.<br />
Back on your local system you need to copy the &#8220;authorized_keys&#8221; file created before to the FreeNAS box.  Using SCP you can do this by running a command like:</p>
<pre>scp -P freenasport authorized_keys freenasuser@freenasaddress:~/.ssh/</pre>
<p>This will copy the file to the FreeNAS box. Next, reconnect to the FreeNAS box as you did before and run.</p>
<pre>cd ~/.ssh/
chmod 600 authorized_keys</pre>
<p>Once your done, you should be able to connect to your FreeNAS box using the private key in the authorized_keys with out a password.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (21.5102)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (17.4435)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (10.7403)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (8.08356)--></li>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (7.69155)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
