<?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>eRacks Open Source Systems Blog &#187; ssh-keygen</title>
	<atom:link href="http://blog.eracks.com/tag/ssh-keygen/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.eracks.com</link>
	<description>Making the world safe for Open Source</description>
	<lastBuildDate>Wed, 10 Aug 2011 23:35:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Putting SSH Keys to Work</title>
		<link>http://blog.eracks.com/2008/11/putting-ssh-keys-to-work/</link>
		<comments>http://blog.eracks.com/2008/11/putting-ssh-keys-to-work/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 00:13:30 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[authentication]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://blog.eracks.com/?p=70</guid>
		<description><![CDATA[There may be situations where you&#8217;d like to login to a remote machine via SSH and not have to enter a password to do it. Perhaps you have some sort of automated file transfer that makes use of SCP. Or, perhaps you frequently login to the same machine and get tired of having to enter [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0in;">There may be situations where you&#8217;d like to login to a remote machine via SSH  and not have to enter a password to do it.  Perhaps you have some sort of  automated file transfer that makes use of SCP.  Or, perhaps you frequently login  to the same machine and get tired of having to enter a password each time.  Whatever the reason may be, an attractive alternative to using passwords  involves making use of cryptographic keys.</p>
<p style="margin-bottom: 0in;">To give you a general idea of what&#8217;s involved, you&#8217;ll first generate a  public/private key pair.  Your public key is what you would copy to every  machine you want to be able to log into.  You can think of the public key as the  lock on a door to a house.  The reason why we call this a public key is that it&#8217;s safe to share it with the public, just as the lock on your door is safe to  display from the outside.  By contrast, your private key can be thought of as  the key that fits into the lock.  Unlike your public key, you should never copy  it to machines that are either untrusted or to machines that you yourself don&#8217;t administer &#8212; this would be a bit like placing the key to your front door  outside your house for strangers to use!  Anybody who possesses your private key  can access every machine to which you&#8217;ve made your public key accessible, so  exercise extreme caution and guard your private key with your life.</p>
<p style="margin-bottom: 0in;">SSH makes generating your keys very simple.  From the command line, you&#8217;ll  simply enter the following command:</p>
<p style="margin-bottom: 0in;"><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">$ssh-keygen </span></span></p>
<p style="margin-bottom: 0in;">You&#8217;ll then be asked a series of questions.  Accept all the defaults.  If you  don&#8217;t desire to password protect your key pair (which would require you to  enter a password when you use it), hit enter when asked for the password, without typing anything in.  At the end of the process, you should discover two  new files in <span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">~/.ssh</span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;">, </span></span><span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">id_rsa</span></span> and<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;"> id_rsa.pub</span></span>, where ~ stands for your home  directory.  From here, you&#8217;ll copy your public key (<span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">id_rsa.pub</span></span>) to every machine  you wish to log into and append its contents to a file called  <span style="font-family: Courier New,monospace;"><span style="font-size: x-small;">~/.ssh/authorized_keys</span></span>, where ~ stands for the home directory of the account  you wish to log into.</p>
<p style="margin-bottom: 0in;">To test your newly generated key pair, try to connect to one or more of the  remote machines you copied your public key to.  You&#8217;ll find that you&#8217;re sent  straight to a command prompt, without the need for a password.</p>
<p style="margin-bottom: 0in;">Now, there are situations where using keys without passwords can potentially be hazardous, so some significant thought should be given to the circumstances in which your key pair will be used.  For example, I will never copy my laptop&#8217;s public key to my personal server at home, because if my laptop is ever stolen, the thief (if he knew how to use *NIX) would not only have access to all my local data, but would also have complete SSH access to my network at home, since he would have my laptop&#8217;s private key.  Thus, I choose to sacrifice convenience for security in that particular situation.  As with all things in life, the amount of relative security versus convenience is a trade off, so make sure you choose wisely.</p>
<p style="margin-bottom: 0in;">Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eracks.com/2008/11/putting-ssh-keys-to-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

