<?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>cat brain.log &#124; less &#187; authorized_keys</title>
	<atom:link href="http://log.largevoid.com/tag/authorized_keys/feed/" rel="self" type="application/rss+xml" />
	<link>http://log.largevoid.com</link>
	<description>Getting it down on `paper`</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setting Up SSH Keys</title>
		<link>http://log.largevoid.com/2009/09/setting-up-ssh-keys/</link>
		<comments>http://log.largevoid.com/2009/09/setting-up-ssh-keys/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 08:29:02 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[authorized_keys]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://log.largevoid.com/?p=34</guid>
		<description><![CDATA[Question How do I configure my machine to be able to ssh into another machine without having to enter a password every time? Answer: Let&#8217;s first define a few things. localhost &#8211; Your regular, every-day machine. This machine will be making outbound calls to other machines, and is the originator of the ssh/scp requests. server [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Question</strong> How do I configure my machine to be able to ssh into another machine without having to enter a password every time?</p>
<p><em>Answer:</em><br />
Let&#8217;s first define a few things.</p>
<ul>
<li><em>localhost</em> &#8211; Your regular, every-day machine.  This machine will be making outbound calls to other machines, and is the originator of the ssh/scp requests.</li>
<li><em>server</em>  &#8211; The machine to which one would want to log into via ssh, or scp files to.</li>
</ul>
<p>First, generate the localhost&#8217;s key:<code><br />
 localhost$ ssh-keygen -b 4096 -t rsa<br />
 localhost$ scp ~/.ssh/id_rsa.pub server:~/.ssh/localhost.pub<br />
</code></p>
<p>We&#8217;ll go the fail-safe way, ensuring that an authorized_keys file exists, then we&#8217;ll cat the old with the new and replace the existing authorized_keys file:<code><br />
  server$ touch ~/.ssh/authorized_keys<br />
  server$ chmod 600 ~/.ssh/authorized_keys<br />
  server$ cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.bak<br />
  server$ cat ~/.ssh/authorized_keys.bak ~/.ssh/localhost.pub > ~/.ssh/authorized_keys<br />
</code></p>
<p>That&#8217;s all there is to it.</p>
<p><strong>Question</strong> Why would you want to do that?</p>
<p><em>Answer:</em><br />
Say you have a bash script that needs to copy files to another machine every time they are generated.  The best way to do that is to scp them.  Scp requires ssh authorization.  By setting up these keys, you can allow your script to scp files securely without locking at the password prompt.</p>
]]></content:encoded>
			<wfw:commentRss>http://log.largevoid.com/2009/09/setting-up-ssh-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  log.largevoid.com/tag/authorized_keys/feed/ ) in 0.25561 seconds, on Feb 8th, 2012 at 12:52 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 8th, 2012 at 1:52 pm UTC -->
