<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Life of a Geek</title>
	<atom:link href="http://geekstar.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekstar.wordpress.com</link>
	<description>Learn, laugh, and geek with me...</description>
	<lastBuildDate>Thu, 23 Oct 2008 21:29:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='geekstar.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Life of a Geek</title>
		<link>http://geekstar.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://geekstar.wordpress.com/osd.xml" title="Life of a Geek" />
	<atom:link rel='hub' href='http://geekstar.wordpress.com/?pushpress=hub'/>
		<item>
		<title>PureFTPd on CentOS 5 Pt 2</title>
		<link>http://geekstar.wordpress.com/2008/10/07/pure-ftp-on-centos-5-pt-2/</link>
		<comments>http://geekstar.wordpress.com/2008/10/07/pure-ftp-on-centos-5-pt-2/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 23:15:08 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Configuration Files]]></category>
		<category><![CDATA[Linux/Unix Articles]]></category>
		<category><![CDATA[Server Builds]]></category>
		<category><![CDATA[CentOS 5]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[useradd]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/?p=57</guid>
		<description><![CDATA[Well now that you have installed a basic server install of CentOS we are going to setup the environment we need in order to use our server. What you haven&#8217;t installed CentOS 5 yet?  You might want to check out part one of this then.  For those of you who have already installed it lets [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=57&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well now that you have installed a basic server install of CentOS we are going to setup the environment we need in order to use our server. What you haven&#8217;t installed CentOS 5 yet?  <a title="CentOS 5 install" href="http://geekstar.wordpress.com/2008/10/03/pure-ftp-on-centos-5/">You might want to check out part one of this then</a>.  For those of you who have already installed it lets move on.</p>
<p>This section covers the configuration of the firewall, ssh, and creating user accounts.  The final part will cover the install of MySQL, PHP, and Pure-ftp.<br />
<span id="more-57"></span></p>
<p>Now this part is all command line baby!!!  So I&#8217;m not going to provide any screen shots since you shouldn&#8217;t need them.  If you think you need screen shots for this section just stop reading now.  Seriously leave!  Okay so first I&#8217;m going to setup ssh.  It should already be installed so all we need to do is configure it.</p>
<p>I&#8217;m kind of a security freak so I&#8217;m going to walk you through how to do public-key authentication, and how to change the port of the ssh server so you aren&#8217;t logging in on the standard port 22.  But before we do that I&#8217;m going to show you how to setup the firewall.  This is a basic setup but should be pretty secure.  If you want to know more about configuring the firewall <a href="http://wiki.centos.org/HowTos/Network/IPTables">check out this tutorial</a>.</p>
<p><code>cd ~<br />
mkdir scripts<br />
vim .ssh/myfirewall<br />
</code></p>
<p>Just paste in this script (make modifications where you see fit):<br />
<code>#!/bin/bash<br />
#<br />
# iptables firewall configuration script</code></p>
<p><code># flush all current rules from iptables<br />
iptables -F</code></p>
<p><code># allow ssh connections on tcp port 8768 &lt;-- this is just random pick anything over 6000<br />
iptables -A INPUT -p tcp --dport 8768 -j ACCEPT<br />
# allow ftp connections on tcp port 21 &lt;-- for more security you can change this<br />
iptables -A INPUT -p tcp --dport 21 -j ACCEPT</code></p>
<p><code># set default policies for INPUT, FORWARD and OUTPUT chains<br />
iptables -P INPUT DROP<br />
iptables -P FORWARD DROP<br />
iptables -P OUTPUT ACCEPT</code></p>
<p><code># set access for localhost<br />
iptables -A INPUT -i lo -j ACCEPT</code></p>
<p><code># accept packets belonging to esablished and related connections<br />
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</code></p>
<p><code># save settings<br />
/sbin/service iptables save</code></p>
<p><code># list the rules<br />
iptables -L -v</code></p>
<p>Finally make this file executable and you have a script:<br />
<code>chmod +x myfirewall</code></p>
<p>To run it you just type (you must be logged in as root):<br />
<code>~/scripts/myfirewall</code></p>
<p>This will make it easier when you want to add rules. It flushes all the rules, rebuilds the rules, saves them, and lists all the rules at the end.  Once this is done we should reboot to let the firewall settings take effect.<br />
<code>shutdown -r now</code></p>
<p>Another thing we want to do before we configure ssh is to create a user.  We aren&#8217;t going to allow root access to ssh so we need someone to login as.  Once it&#8217;s restarted we are going to login as root and create a user.  (just replace <em>username</em> and <em>password</em> with your desired username and password)<br />
<code>useradd <em>username</em><br />
passwd <em>username password</em></code></p>
<p>Now when you login to that username you can always switch to the root user by typing:<br />
<code>su -</code><br />
Then it will prompt you for the root password.  To switch back:<br />
<code>logout</code></p>
<p>Rule of thumb is to never login to root unless you absolutely have to in order to change something.  It can be really dangerous to login as root all the time because if you make a mistake there is most likely no way of going back.  Now that I gave you that warning we are going to login as root because we need to setup the ssh server.</p>
<p>First let&#8217;s create a backup of the sshd_config file so we can go back if we make a mistake.<br />
<code>mv /etc/ssh/sshd_config /etc/ssh/sshd_config.bak</code></p>
<p>Now let&#8217;s edit the original file.<br />
<code>vim /etc/ssh/sshd_config</code></p>
<p><a title="sshd_config file" href="http://geekstar.wordpress.com/2008/10/07/sshd_config-file/" target="_blank">And just copy this configuration and paste it into the window.</a> Or you can type it in manually, just make sure to double check everything at the end.</p>
<p>After you have done that all you need to do is to create the .ssh folder with the authorized keys file.  Make sure you are logged in as a user other than root and do this.</p>
<p><code>mkdir ~/.ssh<br />
chmod 700 ~/.ssh</code></p>
<p>Now all you have to do is to upload your public key to the server.  <a href="http://geekstar.wordpress.com/2008/10/07/setting-up-ssh-client-for-public-key-authentication/">If you do not have one it&#8217;s pretty easy to make</a>.</p>
<p>Now that you have the public-key authentication set up we need to disable the password authentication.  Just go edit the sshd_config file:</p>
<p><code>vim /etc/ssh/sshd_config</code></p>
<p>Find the line that says:</p>
<p><code># Change to no to disable tunnelled clear text passwords<br />
PasswordAuthentication yes</code></p>
<p>and change it to:</p>
<p><code># Change to no to disable tunnelled clear text passwords<br />
<strong>PasswordAuthentication no</strong></code></p>
<p><strong>Warning: only disable the password authentication if you for sure can login using public-key authentication.  If you don&#8217;t then you will have to have console access to fix it.</strong></p>
<p>Okay so I didn&#8217;t plan on having a part 3 to this tutorial, but there is a lot more than I thought there would be.  So now that we have ssh setup properly and have the firewall configured then we are good to move on to the next part.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=57&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/10/07/pure-ftp-on-centos-5-pt-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting Up SSH Client for Public key Authentication</title>
		<link>http://geekstar.wordpress.com/2008/10/07/setting-up-ssh-client-for-public-key-authentication/</link>
		<comments>http://geekstar.wordpress.com/2008/10/07/setting-up-ssh-client-for-public-key-authentication/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 23:08:02 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Linux/Unix Articles]]></category>
		<category><![CDATA[Mac Help]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[authenticaiton]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[puttygen]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-keygen]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/?p=78</guid>
		<description><![CDATA[Setting up the ssh client for using public key authentication is pretty easy. But I remember before I knew how to do it I had to look it up all the time whenever I wanted to setup a machine. Now it&#8217;s become second nature so I am going to show you how it&#8217;s done. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=78&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Setting up the ssh client for using public key authentication is pretty easy.  But I remember before I knew how to do it I had to look it up all the time whenever I wanted to setup a machine.  Now it&#8217;s become second nature so I am going to show you how it&#8217;s done.<br />
<span id="more-78"></span><br />
For Linux/Unix/Mac Os X users:<br />
Open up a terminal window and type the following.<br />
<code>cd ~/.ssh<br />
ssh-keygen -t rsa</code></p>
<p>It will then prompt you with something like this:</p>
<p><code>Generating public/private rsa key pair.<br />
Enter file in which to save the key (/home/user/.ssh/id_rsa):</code> &lt;&#8211; I just press enter here<br />
<code>Enter passphrase (empty for no passphrase):</code> &lt;&#8211; I usually put in a password<br />
<code>Enter same passphrase again:<br />
Your identification has been saved in /home/user/.ssh/id_rsa.<br />
Your public key has been saved in /home/user/.ssh/id_rsa.pub.<br />
The key finger print is:<br />
9d:27:2f:d5:6f:31:a3:fc:8f:f2:10:76:6e:bc:aa:88 user@localhost.localdomain</code></p>
<p>Now that you have a public and private key pair you need to upload your public key to the server you want to connect to.</p>
<p><code>scp ~/.ssh/id_rsa.pub user@host:.</code></p>
<p>Once you do that you need to login to the remote machine and copy the contents of your public key to the users authorized_keys file.</p>
<p><code>cat ~/id_rsa.pub &gt;&gt; .ssh/authorized_keys</code></p>
<p>if there is no .ssh directory:</p>
<p><code>mkdir .ssh<br />
chmod 700 .ssh</code></p>
<p>if there wasn&#8217;t an authorized_keys file before, make sure to modify the permissions (this only needs to be done if you are using strict permissions in the /etc/ssh/sshd_config):<br />
<code>chmod 600 .ssh/authorized_keys</code></p>
<p>That is all you have to do from the client side on a Linux/Unix/Mac Os X machine.  Now lets look at the Windows way of doing things.  I have done this with both XP and Vista before so it should work the same way, that is as well as I can remember it works the same.</p>
<hr />For Windows XP/Vista Users:</p>
<p>Windows doesn&#8217;t come with an ssh client, unlike the other operating systems, so you must download a client in order to use ssh.  Luckily there is <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY!</a> If you click on the very top download it should only take a minute since it is a very lightweight application.  While you are there you are going to need PuTTYgen as well.</p>
<p>Now for the part that sucks for me&#8230; having to take screen shots, optimize the images, upload them and paste them.  All the while supplying you with step by step instructions.  Seriously I give props to the people that do this more than I do, this takes a long time to make a tutorial.</p>
<p>So lets open up PuTTYgen and see what it looks like.</p>
<p><a href="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-1-1.jpg"><img class="size-full wp-image-86" title="putty_key_gen-1-1" src="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-1-1.jpg?w=480" alt=""   /></a></p>
<p>Just click on the &#8220;Generate&#8221; button.  And you will get this screen.</p>
<p><a href="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-2-1.jpg"><img class="size-full wp-image-87" title="putty_key_gen-2-1" src="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-2-1.jpg?w=480" alt=""   /></a></p>
<p>This part is kind of fun because you get to move your mouse around in that area to generate the key.  The only time it sucks is when you set the number of bits to higher than 1024, I would normally go with 2048 but you always have the choice of 4084 as well.  If you choose the last one I hope you have some stamina because it takes a while.</p>
<p><a href="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-3-1.jpg"><img class="alignnone size-full wp-image-88" title="putty_key_gen-3-1" src="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-3-1.jpg?w=480" alt=""   /></a></p>
<p>Now you just need to type in the information you want.  If you don&#8217;t want to put a password for the private key that is your choice.  If you want to make a password you can always use <a title="Pageant Download" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">pageant</a> to make it so you don&#8217;t have to type a password everytime.  MAKE SURE YOU SAVE BOTH THE PRIVATE AND PUBLIC KEYS!  And put them in a location you can find.</p>
<p>Now we insert that private key into PuTTY.  So lets configure our PuTTY session.</p>
<p><a href="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-4-1.jpg"><img class="alignnone size-full wp-image-89" title="putty_key_gen-4-1" src="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-4-1.jpg?w=480" alt=""   /></a></p>
<p>First we are going to open up PuTTY and go to the Auth section under SSH.  Leave the defaults and browse for where you saved your private key.  Now go back up to Sessions.</p>
<p><a href="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-5-1.jpg"><img class="alignnone size-full wp-image-90" title="putty_key_gen-5-1" src="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-5-1.jpg?w=480" alt=""   /></a></p>
<p>Fill out the connection information, create a session name and save the configuration.  Now we have to upload the public key to the server.</p>
<p>Hopefully the ssh server is using password authentication right now, or you have some means to ssh into the server.  Because this is now command line via ssh.  Let&#8217;s upload the public key to the server.</p>
<p><code>scp /path/to/file/publickey.pub user@host:.</code></p>
<p>Now connect via ssh to the server, we are going to add the public key to the authorized_keys file.  Since we used PuTTYgen to create the public key we need to convert it to the openssh format. And in that same command we append it to the end of the authorized_keys file.</p>
<p><code>ssh-keygen -if publickey.pub &gt;&gt; .ssh/authorized_keys</code></p>
<p>and that&#8217;s all folks!  Now you should be able to connect to your server using public key authentication.  Hope you made it through this okay.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=78&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/10/07/setting-up-ssh-client-for-public-key-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-1-1.jpg" medium="image">
			<media:title type="html">putty_key_gen-1-1</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-2-1.jpg" medium="image">
			<media:title type="html">putty_key_gen-2-1</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-3-1.jpg" medium="image">
			<media:title type="html">putty_key_gen-3-1</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-4-1.jpg" medium="image">
			<media:title type="html">putty_key_gen-4-1</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/putty_key_gen-5-1.jpg" medium="image">
			<media:title type="html">putty_key_gen-5-1</media:title>
		</media:content>
	</item>
		<item>
		<title>sshd_config file</title>
		<link>http://geekstar.wordpress.com/2008/10/07/sshd_config-file/</link>
		<comments>http://geekstar.wordpress.com/2008/10/07/sshd_config-file/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 20:57:12 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Configuration Files]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[public-key authentication]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/?p=65</guid>
		<description><![CDATA[Here is my configuration file for OpenSSH server. I have configured it to use public key authentication, and have only left the password authentication on so that people can test it before they turn it off. # Package generated configuration file # See the sshd(8) manpage for details # What ports, IPs and protocols we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=65&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is my configuration file for OpenSSH server.  I have configured it to use public key authentication, and have only left the password authentication on so that people can test it before they turn it off.<br />
<span id="more-65"></span></p>
<p><code># Package generated configuration file<br />
# See the sshd(8) manpage for details</code></p>
<p><code># What ports, IPs and protocols we listen for<br />
Port 8768<br />
# Use these options to restrict which interfaces/protocols sshd will bind to<br />
#ListenAddress ::<br />
#ListenAddress 0.0.0.0<br />
Protocol 2<br />
# HostKeys for protocol version 2<br />
HostKey /etc/ssh/ssh_host_rsa_key<br />
HostKey /etc/ssh/ssh_host_dsa_key<br />
#Privilege Separation is turned on for security<br />
UsePrivilegeSeparation yes</code></p>
<p><code># Lifetime and size of ephemeral version 1 server key<br />
KeyRegenerationInterval 3600<br />
ServerKeyBits 768</code></p>
<p><code># Logging<br />
SyslogFacility AUTH<br />
LogLevel DEBUG</code></p>
<p><code># Authentication:<br />
LoginGraceTime 120<br />
PermitRootLogin no<br />
StrictModes yes</code></p>
<p><code>RSAAuthentication yes<br />
PubkeyAuthentication yes<br />
#AuthorizedKeysFile	%h/.ssh/authorized_keys</code></p>
<p><code># Don't read the user's ~/.rhosts and ~/.shosts files<br />
IgnoreRhosts yes<br />
# For this to work you will also need host keys in /etc/ssh_known_hosts<br />
RhostsRSAAuthentication no<br />
# similar for protocol version 2<br />
HostbasedAuthentication no<br />
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication<br />
#IgnoreUserKnownHosts yes</code></p>
<p><code># To enable empty passwords, change to yes (NOT RECOMMENDED)<br />
PermitEmptyPasswords no</code></p>
<p><code># Change to yes to enable challenge-response passwords (beware issues with<br />
# some PAM modules and threads)<br />
ChallengeResponseAuthentication no</code></p>
<p><code># Change to no to disable tunnelled clear text passwords<br />
PasswordAuthentication yes</code></p>
<p><code># Kerberos options<br />
#KerberosAuthentication no<br />
#KerberosGetAFSToken no<br />
#KerberosOrLocalPasswd yes<br />
#KerberosTicketCleanup yes</code></p>
<p><code># GSSAPI options<br />
#GSSAPIAuthentication no<br />
#GSSAPICleanupCredentials yes</code></p>
<p><code>X11Forwarding no<br />
#X11DisplayOffset 10<br />
PrintMotd no<br />
PrintLastLog yes<br />
TCPKeepAlive yes<br />
#UseLogin no</code></p>
<p><code>#MaxStartups 10:30:60<br />
#Banner /etc/issue.net</code></p>
<p><code># Allow client to pass locale environment variables<br />
AcceptEnv LANG LC_*</code></p>
<p><code>Subsystem sftp /usr/lib/openssh/sftp-server</code></p>
<p><code>UsePAM yes</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=65&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/10/07/sshd_config-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>
	</item>
		<item>
		<title>PureFTPd on CentOS 5 Pt 1</title>
		<link>http://geekstar.wordpress.com/2008/10/03/pure-ftp-on-centos-5/</link>
		<comments>http://geekstar.wordpress.com/2008/10/03/pure-ftp-on-centos-5/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 23:03:29 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Server Builds]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[pure-ftp]]></category>
		<category><![CDATA[server build]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/2008/10/03/pure-ftp-on-centos-5/</guid>
		<description><![CDATA[I mostly work with Ubuntu because I like it. You might say that I&#8217;m not a real Linux guy because of this fact and I&#8217;m okay with that, you don&#8217;t know me. But because of some work requirements I am having to build up CentOS environments. So I figured I would document the build for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=34&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I mostly work with Ubuntu because I like it.  You might say that I&#8217;m not a real Linux guy because of this fact and I&#8217;m okay with that, you don&#8217;t know me.  But because of some work requirements I am having to build up CentOS environments.  So I figured I would document the build for my own sanity.  This way when I have to build a similar one I have some instructions on what I did.</p>
<p>This is good news for me, and good news for you if you want to be like me and build servers.  This server is going to be a Pure-ftp server install.  So I&#8217;m going to have it setup for everything I need to have a working FTP server<br />
<span id="more-34"></span><br />
So I guess we can start at the beginning.  I&#8217;m going to walk through the install steps that I did.  I don&#8217;t really like the way that CentOS takes up so much space when you install a Graphical User Interface (GUI, I know most of you are thinking, &#8220;I&#8217;m not a moron I know what that means&#8221;).  Luckily CentOS gives you lots of options in the installation.</p>
<p>I downloaded the DVD image here: http://isoredirect.centos.org/centos/5/isos/i386/</p>
<p>If you want the 64-bit version: http://isoredirect.centos.org/centos/5/isos/x86_64/</p>
<p>I am using the i386 version but I&#8217;m assuming the install goes pretty much the same way.</p>
<p>Once you have that, and a ready machine to install it on (mine is a virtual machine) then we are ready to begin.</p>
<p>So pop the CD in and boot up the machine to the CD.</p>
<p>Just hit enter at this screen.</p>
<p><img class="alignnone" title="Install Screen 1" src="http://geekstar.files.wordpress.com/2008/10/centos-1.jpg?w=500&#038;h=372" alt="" width="500" height="372" /></p>
<p>The next screen asks you to check the CD, just go ahead and skip it.</p>
<p><img class="alignnone" title="Install Screen 2" src="http://geekstar.files.wordpress.com/2008/10/install-2.jpg?w=500&#038;h=282" alt="" width="500" height="282" /></p>
<p>Then once it loads the GUI install screen hit next.</p>
<p><img class="alignnone" title="Install Screen 3" src="http://geekstar.files.wordpress.com/2008/10/install-3-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Select the language.</p>
<p><img class="alignnone" title="Install Screen 4" src="http://geekstar.files.wordpress.com/2008/10/install-4-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Choose your keyboard layout.</p>
<p><img class="alignnone" title="Install Screen 5" src="http://geekstar.files.wordpress.com/2008/10/install-5-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Now my (virtual) disk was completey unformatted so I got this warning.  I just clicked yes.</p>
<p><img class="alignnone" title="Install Screen 6" src="http://geekstar.files.wordpress.com/2008/10/install-6-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Now on this next screen I don&#8217;t really need any special partitioning schemes.  I&#8217;m installing this on to an 8 GB disk and once I have it up on my servers I&#8217;m going to add like a 20 GB secondary disk.  <a title="How to Partition" href="http://tldp.org/HOWTO/Partition/requirements.html">If you don&#8217;t know much about partitioning you should read this</a>.</p>
<p><img class="alignnone" title="Install Screen 7" src="http://geekstar.files.wordpress.com/2008/10/install-7-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>I told it to delete everything on the disk so it will throw a warning which I accept.</p>
<p><img class="alignnone" title="Install Screen 8" src="http://geekstar.files.wordpress.com/2008/10/install-8-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>On this you normally want to do a manual static IP address assignment.  But I&#8217;m not going to do that, because I am using DHCP assignments so this will have it&#8217;s own reserved address on my network.  So while you might want to use a static address, I&#8217;m going to accept the default and use DHCP.</p>
<p><img class="alignnone" title="Install Screen 9" src="http://geekstar.files.wordpress.com/2008/10/install-9-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Next you want to choose your time zone.</p>
<p><img class="alignnone" title="Install Screen 10" src="http://geekstar.files.wordpress.com/2008/10/install-10-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Choose a password for the root login.  I recommend at least 8 characters, and using a random password generator making sure to include both capital and lowercase alphanumeric characters as well as symbols. (<em>ex. Niu!5a?L, but just so you know I didn&#8217;t use this one</em>) I have these generated for me using a <a title="Random Password Generator" href="http://www.pctools.com/guides/password/">random password generator online</a>.<strong> </strong>I usually have it generate like 10-15 then I choose the ones I like.  Just make sure you can remember it.</p>
<p><img class="alignnone" title="Install Screen 11" src="http://geekstar.files.wordpress.com/2008/10/install-11-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>Next we are going to choose our environment.  I am looking for optimal performance in this server so I&#8217;m not going to choose a GUI, they just take up too many resources, so I am selecting server.  This will be command line only after the OS install.  Notice at the bottom how I selected &#8220;customize now&#8221; at the bottom of the screen.</p>
<p><img class="alignnone" title="Install Screen 12" src="http://geekstar.files.wordpress.com/2008/10/install-12-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /><br />
Next we are going to choose some packages to install from the CD.  We are going to leave the defaults in most categories but we need to add and subtract a few here and there.  On this screen I chose that I wanted the development tools (this is so we can compile programs from source if neccessary).</p>
<p><img class="alignnone" title="Install Screen 13" src="http://geekstar.files.wordpress.com/2008/10/install-13-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>In the server category we are going to uncheck most of them.  I only left the mail server (in case I want to setup notifications later using a service monitor), server configuration tools, and at the very bottom even though you can&#8217;t see it Windows file integration.</p>
<p><img class="alignnone" title="Install Screen 13" src="http://geekstar.files.wordpress.com/2008/10/install-13-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>After those customizations we hit next and move on and everything gets installed.</p>
<p><img class="alignnone" title="Install Screen 15" src="http://geekstar.files.wordpress.com/2008/10/install-15-1.jpg?w=500&#038;h=375" alt="" width="500" height="375" /></p>
<p>It takes about 15-20 minutes.  But we are finally finished with the CentOS install.  Next we will add our apache, php, mysql, pureftp, and other goodies.  We didn&#8217;t add them earlier because I like to have a little more control, I like to have the latest and greatest.  There are other cases where you want to install a certain version of apache or mysql and php because of support and what not.  Let&#8217;s move on shall we?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=34&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/10/03/pure-ftp-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/centos-1.jpg" medium="image">
			<media:title type="html">Install Screen 1</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-2.jpg" medium="image">
			<media:title type="html">Install Screen 2</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-3-1.jpg" medium="image">
			<media:title type="html">Install Screen 3</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-4-1.jpg" medium="image">
			<media:title type="html">Install Screen 4</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-5-1.jpg" medium="image">
			<media:title type="html">Install Screen 5</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-6-1.jpg" medium="image">
			<media:title type="html">Install Screen 6</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-7-1.jpg" medium="image">
			<media:title type="html">Install Screen 7</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-8-1.jpg" medium="image">
			<media:title type="html">Install Screen 8</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-9-1.jpg" medium="image">
			<media:title type="html">Install Screen 9</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-10-1.jpg" medium="image">
			<media:title type="html">Install Screen 10</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-11-1.jpg" medium="image">
			<media:title type="html">Install Screen 11</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-12-1.jpg" medium="image">
			<media:title type="html">Install Screen 12</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-13-1.jpg" medium="image">
			<media:title type="html">Install Screen 13</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-13-1.jpg" medium="image">
			<media:title type="html">Install Screen 13</media:title>
		</media:content>

		<media:content url="http://geekstar.files.wordpress.com/2008/10/install-15-1.jpg" medium="image">
			<media:title type="html">Install Screen 15</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 8.04 Rails Server Build Pt 1</title>
		<link>http://geekstar.wordpress.com/2008/08/28/ubuntu-804-rails-server-build-pt-1/</link>
		<comments>http://geekstar.wordpress.com/2008/08/28/ubuntu-804-rails-server-build-pt-1/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 18:40:00 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Server Builds]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[Hardy Heron]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mongrel]]></category>
		<category><![CDATA[mongrel cluster]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[server build]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/?p=22</guid>
		<description><![CDATA[Building up a server for Ruby on Rails can be a big pain, especially if you don&#8217;t know what you are doing. Here is my build of an Ubuntu server using 8.04 Hardy Heron. You can use this as a guide to build either a server using the server or desktop edition of Ubuntu. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=22&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Building up a server for Ruby on Rails can be a big pain, especially if you don&#8217;t know what you are doing.  Here is my build of an Ubuntu server using 8.04 Hardy Heron.  You can use this as a guide to build either a server using the server or desktop edition of Ubuntu.  It is all command line so it will work either way.</p>
<p>I am not going to cover the actual install of Ubuntu because this is going to be long enough without that.  Ubuntu makes their installer very easy but if I get some requests to document the install process I might post it up later.<br />
<span id="more-22"></span><br />
Once you have Ubuntu 8.04 installed the first thing you are going to want to do is edit your software repository sources list.  Open up the command line (because the rest of this will be done using that) and away we go.</p>
<p>First make a backup of the sources.list file so if we screw it up you can revert back:</p>
<p><code>#: sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup</code></p>
<p>Next edit the file:</p>
<p><code>#: sudo vi /etc/apt/sources.list</code></p>
<p>Comment out the line about the cd-rom drive.  Uncomment the lines about the universe, backports, and security repositories, Save the file: (vi command -&gt; :wq) and update the repositories packages:</p>
<p><code>#: sudo apt-get update</code></p>
<p>Next we are going to install the ssh server.  I am only going to mention the things that I configure for ssh but I am not going to discuss why, so once it is installed you <a href="http://sial.org/howto/openssh/publickey-auth/">should check this out for getting the configuration to work</a>.</p>
<p>Install ssh server:</p>
<p><code>#: sudo apt-get install ssh</code></p>
<p>Make a backup of the ssh configuration file:</p>
<p><code>#: sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup</code></p>
<p>Edit the ssh configuration file:</p>
<p><code>#: sudo vi /etc/ssh/sshd_config</code></p>
<p>Look for the line that says:</p>
<p><code># What ports, Ips and protocols we listen for<br />
Port 22</code></p>
<p>Change the port number to some arbitrary number like 6302, but make sure you remember the port number because you will need it to connect to the server.  Look for the line like this:</p>
<p><code>PasswordAuthentication yes</code></p>
<p>and change it to no.  <strong>Don&#8217;t do this until after you have verified that you can ssh into your server and it accepts the public key</strong>.  Save the file.  Then restart ssh using the following command:</p>
<p><code>#: sudo /etc/init.d/ssh restart</code></p>
<p>Next we are going to install ruby using apt-get. Some might prefer to install a particular version if this is the case look into building it from source.  If you just want a working ruby on rails server and don&#8217;t care if it is version 1.8.6 then proceed with my instructions.</p>
<p><code>#: sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libxml-ruby libxml2-dev</code></p>
<p><em>(Note: that was all one line so don&#8217;t add any carriage returns)</em></p>
<p>Now that ruby is installed we are going to install RubyGems from source and use that to get rails and other things.  First we need to download it using wget, I am installing RubyGems version 1.1.1 but you can <a href="http://rubyforge.org/frs/?group_id=126">download any version you want</a>.</p>
<p><code>#: wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz</code></p>
<p>Now lets extract and install it:</p>
<p><code>#: tar -xzf rubygems-1.1.1.tgz<br />
#: cd rubygems-1.1.1<br />
#: sudo ruby setup.rb<br />
#: sudo ln -s /usr/bin/gem1.8 /usr/bin/gem</code></p>
<p>Next we will use Ruby Gem to install Rails:</p>
<p><code>#: sudo gem install rails</code></p>
<p>Once that is done we will install Mongrel (used for serving up rails):</p>
<p><code>#: sudo gem install mongrel<br />
#: sudo gem install mongrel_cluster</code></p>
<p>Finally install Nginx (our webserver):</p>
<p><code>#: sudo aptitude install nginx</code></p>
<p>Alright we have everything installed, now it is time to configure it.  But for now I am going to take a break, I know I know it only took 30 minutes to get to this point, but it has taken me hours to make this post so BACK OFF!  I promise to post up the configuration for everything soon.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/geekstar.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/geekstar.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=22&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/08/28/ubuntu-804-rails-server-build-pt-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>
	</item>
		<item>
		<title>Rotating Daily Backups using Rsync in Linux</title>
		<link>http://geekstar.wordpress.com/2008/08/17/rotating-daily-backups-using-rsync-in-linux/</link>
		<comments>http://geekstar.wordpress.com/2008/08/17/rotating-daily-backups-using-rsync-in-linux/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 01:25:55 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Linux/Unix Articles]]></category>
		<category><![CDATA[backup rotation]]></category>
		<category><![CDATA[bash scripts]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/?p=16</guid>
		<description><![CDATA[I am not a Linux guru by any means but I know enough to get around. I am going to share with you my scripts for rotating the backups for a website that I manage.  Anyone who knows a better way is welcome to share with me, but for now this is what I have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=16&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am not a Linux guru by any means but I know enough to get around. I am going to share with you my scripts for rotating the backups for a website that I manage.  Anyone who knows a better way is welcome to share with me, but for now this is what I have and it works well enough for me.<br />
<span id="more-16"></span><br />
Learning to write shell scripts was not actually that hard.  I found a <a href="http://www.calpoly.edu/~rasplund/script.html">good resource</a> on the syntax (grammar) which helped me figure out the rest.  My script for rotating the daily backups is below.  It really could be done in one long line using just the <a href="http://samba.anu.edu.au/ftp/rsync/rsync.html">rsync command</a>, but to make it more portable and readable I used a lot of variables.  The script should be pretty well commented so you should be able to pick up on what everything is doing.  Once you have the script copied you just need to create a cron job using <a href="http://www.adminschoice.com/docs/crontab.htm">crontab</a>.  If you have any questions or comments on this, please let me know.</p>
<p><code><br />
#!/bin/bash<br />
#<br />
# daily backup script the rsync way<br />
</code><br />
<code><br />
# command variables<br />
# this makes it easier to transfer the script to different<br />
# flavors of Linux/Unix.  sometimes the locations of these<br />
# commands are in different places.<br />
RSYNC=/usr/bin/rsync<br />
SSH=/usr/bin/ssh<br />
CP=/bin/cp<br />
</code><br />
<code><br />
# directory variables<br />
# RDIR is the remote directory you will be copying the contents of.<br />
# LDIR is the local directory you want to copy to.<br />
# BACKUP is the backup folder that will hold everything.<br />
RDIR=./www/<br />
LDIR=~/backup<br />
</code><br />
<code><br />
# remote host variable<br />
# this is the remote host you are connecting to via ssh.<br />
RHOST=hostname<br />
</code><br />
<code><br />
# rsync exclude file<br />
# this file must exist or it will cause an error. anything you don't<br />
# want to include from the source you will add it as a line in this file.<br />
EXCLUDED=$LDIR/excluded_backup<br />
</code><br />
<code><br />
# rsync options variable<br />
# these are the options used for rsync to get the kind of backups<br />
# you want.<br />
# -a is the archive option which will do a lot of different things<br />
# for you.<br />
# -z is for compression, and -H is for preserving the hard-links.<br />
# --delete will delete any files on the destination that are no longer<br />
# in the source directory.<br />
OPTS="-azH --backup --delete --exclude-from=$EXCLUDED"<br />
</code><br />
<code><br />
# finally the rsync command that should create 7 daily backups<br />
$RSYNC -e $SSH $OPTS $RHOST:$RDIR $LDIR/daily-`date +%u`</code><br />
</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/geekstar.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/geekstar.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=16&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/08/17/rotating-daily-backups-using-rsync-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>
	</item>
		<item>
		<title>Quicksilver (You Need This!!!)</title>
		<link>http://geekstar.wordpress.com/2008/07/18/quicksilver-you-need-this/</link>
		<comments>http://geekstar.wordpress.com/2008/07/18/quicksilver-you-need-this/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 03:41:18 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Quicksilver]]></category>
		<category><![CDATA[Screencast]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/?p=5</guid>
		<description><![CDATA[If you are a proud owner of an Apple computer and you have never heard of Quicksilver, go download it&#8230; I&#8217;m serious!  Stop reading and go download it right now!!! You can get it here. Now that you have it I will explain what this application does.  Quicksilver is, in the most simple explanation possible, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=5&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are a proud owner of an Apple computer and you have never heard of Quicksilver, go download it&#8230; I&#8217;m serious!  Stop reading and go download it right now!!! <a href="http://www.blacktree.com/">You can get it here.</a></p>
<p>Now that you have it I will explain what this application does.  Quicksilver is, in the most simple explanation possible, an application launcher.  It will allow you to quickly access all of the applications and files in your computer.  It will save you tons of time, and you will soon become addicted to it.  It does do more than just launching applications of course but the other functions are more of an advanced use.  Luckily for you I am providing links to videos that will explain everything from the begining to the advanced.<br />
<span id="more-5"></span><br />
I would explain it all myself, but why put in the work that someone has already done and probably better than I could do.  So without further ado here are the instructions to help you out with your new favorite program.</p>
<p>Introduction and Basic Use:</p>
<span style="text-align:center; display: block;"><a href="http://geekstar.wordpress.com/2008/07/18/quicksilver-you-need-this/"><img src="http://img.youtube.com/vi/EBvFUhTqKK4/2.jpg" alt="" /></a></span>
<p>Intermediate:</p>
<span style="text-align:center; display: block;"><a href="http://geekstar.wordpress.com/2008/07/18/quicksilver-you-need-this/"><img src="http://img.youtube.com/vi/EydTYOeqIrk/2.jpg" alt="" /></a></span>
<p>Advanced:</p>
<span style="text-align:center; display: block;"><a href="http://geekstar.wordpress.com/2008/07/18/quicksilver-you-need-this/"><img src="http://img.youtube.com/vi/0DYb56xxnh4/2.jpg" alt="" /></a></span>
<p>After watching these you should hopefully see the value in this application, and your probably a pro at using it.  Enjoy!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/geekstar.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/geekstar.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=5&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/07/18/quicksilver-you-need-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction</title>
		<link>http://geekstar.wordpress.com/2008/05/26/introduction/</link>
		<comments>http://geekstar.wordpress.com/2008/05/26/introduction/#comments</comments>
		<pubDate>Mon, 26 May 2008 21:58:00 +0000</pubDate>
		<dc:creator>geekstar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekstar.wordpress.com/2008/05/26/introduction/</guid>
		<description><![CDATA[I have been thinking about joining the blogging community for a long time. I have always felt that I have something to offer the rest of the world but unfortunately it wasn&#8217;t always apparent to me what that was. Recently my little sister graduated from college with a degree in graphic design. But the program [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=4&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been thinking about joining the blogging community for a long time.  I have always felt that I have something to offer the rest of the world but unfortunately it wasn&#8217;t always apparent to me what that was.  Recently my little sister graduated from college with a degree in graphic design.  But the program she was in didn&#8217;t offer much help in building websites.  I had the opportunity to go in and share my knowledge with some of her classmates, a little less than a year ago, only to find out that they didn&#8217;t want to learn how to make websites, they wanted to learn Dreamweaver.<br />
<span id="more-4"></span></p>
<p>How could I convey to them, in a one-hour period, that learning a program is not going to give them the knowledge they needed?  So I gave up and showed them around Dreamweaver but made sure to throw out as many resources at the end, for those that really wanted to learn how to make websites.</p>
<p>But now my sister is stuck searching for classes on basic web design just to supplement what should have been built in to her $30,000 a year education.  The maddening frustration of it all lit a spark under me and now I have set out to educate the world.  I offer my services free of charge, that is unless someone decides to offer me millions of dollars to package my lessons into a book or something.  Then you guys will be deciding which you need more, food or my fabulous book or DVD set or whatever it turns out to be.</p>
<p>But until that day I hope you guys at least learn a few things.  Make sure to post comments on lessons telling me what you like and don&#8217;t like.  I take constructive criticism very well but blatant bashing of a personal nature will not be tolerated.  With that said enjoy the rest of the blog.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/geekstar.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/geekstar.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekstar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekstar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekstar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekstar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekstar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekstar.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekstar.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekstar.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekstar.wordpress.com&amp;blog=4255872&amp;post=4&amp;subd=geekstar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekstar.wordpress.com/2008/05/26/introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b3f6f57d45c91bf53fd5fba949bbd88?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekstar</media:title>
		</media:content>
	</item>
	</channel>
</rss>
