<?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>Fedora &#187; SSH</title>
	<atom:link href="http://gofedora.com/archives/category/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://gofedora.com</link>
	<description>How Tos, Tutorials, Tips and Tricks</description>
	<lastBuildDate>Thu, 17 May 2012 04:44:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How To: RSA Key Generation for Remote Host</title>
		<link>http://gofedora.com/how-to-rsa-key-generation-remote-host/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-rsa-key-generation-remote-host</link>
		<comments>http://gofedora.com/how-to-rsa-key-generation-remote-host/#comments</comments>
		<pubDate>Thu, 08 Dec 2005 16:03:26 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Automatic Login]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Remote Login]]></category>
		<category><![CDATA[RSA Key]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=262</guid>
		<description><![CDATA[Using RSA key of a remote machine you can authenticate for SSH for that machine without entering a password. Generating RSA key is very easy and simple. Follow the procedure below to generate keys for two machine. Machies: 1) mirage (192.168.36.205) and students (192.168.36.200). Step 1 use this command on mirage server 1 2 3 [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-rsa-key-generation-remote-host/' addthis:title='How To: RSA Key Generation for Remote Host '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p></p><p>Using RSA key of a remote machine you can authenticate for SSH for that machine without entering a password. Generating RSA key is very easy and simple. Follow the procedure below to generate keys for two machine. Machies: 1) mirage (192.168.36.205) and students (192.168.36.200).</p>
<p><strong>Step 1</strong><br />
use this command on mirage server</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>kulbir<span style="color: #000000; font-weight: bold;">@</span>mirage ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa
Generating public<span style="color: #000000; font-weight: bold;">/</span>private rsa key pair.
Enter <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #c20cb9; font-weight: bold;">which</span> to save the key <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
Enter passphrase <span style="color: #7a0874; font-weight: bold;">&#40;</span>empty <span style="color: #000000; font-weight: bold;">for</span> no passphrase<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
Enter same passphrase again:
Your identification has been saved <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.
Your public key has been saved <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.pub.
The key fingerprint is:
<span style="color: #000000;">32</span>:<span style="color: #000000;">30</span>:af:c6:0b:e2:c0:<span style="color: #000000;">60</span>:<span style="color: #000000;">92</span>:fd:<span style="color: #000000;">62</span>:da:<span style="color: #000000;">37</span>:<span style="color: #000000;">32</span>:f2:ce root<span style="color: #000000; font-weight: bold;">@</span>LocalHost</pre></td></tr></table></div>

<p>You should get the result as above and if it asks to overwrite something then overwrite it.</p>
<p><strong>Step 2</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>kulbir<span style="color: #000000; font-weight: bold;">@</span>mirage ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">scp</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.pub user<span style="color: #000000; font-weight: bold;">@</span>192.168.36.200:~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys2
user<span style="color: #000000; font-weight: bold;">@</span>192.168.36.200<span style="color: #ff0000;">''</span>s password:</pre></td></tr></table></div>

<p>Now if the above operation was successful, then you can login from your mirage account to your students account without a password. Try it, and if it is successful then do the same for your students server. Now you don&#8217;t need type your password again and again to login from one server to the other.</p>
<p>If the above worked for you, then there is one more thing you can try out. Go to .ssh/ directory in your home directory and create a file named &#8216;config&#8217;. Now write in that file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">host students
<span style="color: #c20cb9; font-weight: bold;">hostname</span> 192.168.36.200
port <span style="color: #000000;">22</span>
user kulbirsaini</pre></td></tr></table></div>

<p>and save the file. You have to specify the port on which SSH is listening. Save this file and now you can login by just typing</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>kulbir<span style="color: #000000; font-weight: bold;">@</span>mirage ~<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> students <span style="color: #7a0874; font-weight: bold;">&#91;</span>Enter<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>You can write whatever you want in place of &#8216;students&#8217; in the file and then login typing <em>ssh &#8216;word&#8217;</em> that you have written against the host in file.</p>
<p><a href="http://gofedora.com/">Fedora Tutorials</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://gofedora.com/how-to-rsa-key-generation-remote-host/' addthis:title='How To: RSA Key Generation for Remote Host '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-rsa-key-generation-remote-host/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

