<?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>Ivan Villareal</title>
	<atom:link href="http://blog.ivanvillareal.info/tag/key/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ivanvillareal.info</link>
	<description>IT stuff and more...</description>
	<lastBuildDate>Fri, 13 Aug 2010 23:05:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up ssh keys for passwordless login</title>
		<link>http://blog.ivanvillareal.info/linux/setting-up-ssh-keys-for-passwordless-login/</link>
		<comments>http://blog.ivanvillareal.info/linux/setting-up-ssh-keys-for-passwordless-login/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 23:57:29 +0000</pubDate>
		<dc:creator>Ivan Villareal</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[passwordless]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.ivanvillareal.info/?p=40</guid>
		<description><![CDATA[Most part of the time I&#8217;ve spent on my development machine I have several terminals opened, but thanks to screen I only have one per server.
However I&#8217;m constantly in the need to login to some servers just to make a quick check of something, so I have to type in my credentials every time I [...]]]></description>
			<content:encoded><![CDATA[<p>Most part of the time I&#8217;ve spent on my development machine I have several terminals opened, but thanks to <a title="Screen is a full-screen window manager that multiplexes a physical terminal between several processes" href="http://www.gnu.org/software/screen/" target="_blank">screen </a>I only have one per server.</p>
<p>However I&#8217;m constantly in the need to login to some servers just to make a quick check of something, so I have to type in my credentials every time I log in, this really annoys me, because when I&#8217;m focused on something I don&#8217;t want to loose that focus waiting for the login prompt.</p>
<p>So what I did &nbsp;to fix this annoyance, was to use Key Authentication &nbsp;instead of Password Authentication, I&#8217;ve been using this for several years now under several distros&nbsp;without&nbsp;a problem.</p>
<p>So in short this is what I do, whenever I want to use Key Auth.<br />
<pre>gondor .ssh # cd ~/.ssh
gondor .ssh ~ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
53:df:bb:74:24:2d:7f:78:1f:85:66:f0:19:b6:9f:71 root@gondor
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|          . . o  |
|         . . = * |
|        S   . @.E|
|         .   o O=|
|              +o*|
|             . ++|
|              . .|
+-----------------+</pre><br />
I haven&#8217;t set a password for the key, &nbsp;because if I set a password I would have to type the password for the key each time, or setup a program to remember the key password like Gnome Keyring or Putty Pageant in Windows.</p>
<p>After my private and public keys are generated I copy the public key to the server where I want to access&nbsp;without&nbsp;password<br />
<pre>
gondor .ssh # ssh-copy-id -i id_rsa.pub ivan@odin
The authenticity of host 'odin (192.168.1.201)' can't be established.
RSA key fingerprint is bb:36:b4:0b:05:13:ce:a2:2e:95:97:59:65:f3:f8:a8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'odin,192.168.1.201' (RSA) to the list of known hosts.
Password:
Now try logging into the machine, with "ssh 'ivan@odin'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

gondor .ssh # ssh ivan@odin
Last login: Fri Sep 25 15:50:03 PDT 2009 from gondor.artedigital on ssh
Last login: Fri Sep 25 15:50:07 2009 from gondor.artedigital
ivan@odin ~ $</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ivanvillareal.info/linux/setting-up-ssh-keys-for-passwordless-login/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
