<?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>Ardweb</title>
	<atom:link href="http://www.ardweb.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ardweb.co.uk</link>
	<description>Chic geek</description>
	<lastBuildDate>Thu, 24 Mar 2011 21:51:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Passwordless logins with SSH</title>
		<link>http://www.ardweb.co.uk/2011/03/24/passwordless-logins-with-ssh/</link>
		<comments>http://www.ardweb.co.uk/2011/03/24/passwordless-logins-with-ssh/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 21:51:39 +0000</pubDate>
		<dc:creator>ademuk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ardweb.co.uk/?p=294</guid>
		<description><![CDATA[You can SSH without using a password by generating a private/public key pair. The public key resides on the computer you are connecting to (server) and is compared with your private key on the computer you are connecting from (client). We will be generating the keys on the client computer: MacBook-Pro:~ adem$ ssh-keygen -t dsa [...]]]></description>
			<content:encoded><![CDATA[<p>You can SSH without using a password by generating a private/public  key pair.  The public key resides on the computer you are  connecting to (server) and is compared with your private key on the computer you are  connecting from (client).</p>
<p>We will be generating the keys on the <strong>client</strong> computer:</p>
<pre>MacBook-Pro:~ adem$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/adem/.ssh/id_dsa):
Enter passphrase (empty for no passphrase): abcd
Enter same passphrase again: abcd
</pre>
<p>The <code>ssh-keygen</code> programme has just created two DSA (-t dsa specifies this) keys on your Mac.  <code>id_dsa</code> is the private key and  <code>id_dsa.pub</code> is the public key.  You need to copy  the public key, <code>~/.ssh/id_dsa.pub</code> from the client to <code>~/.ssh/authorized_keys2</code> on the server using <code>scp</code>:</p>
<pre>scp [source] [user]@[remote.host]:[destination] [-P port]</pre>
<p>For example:</p>
<pre>Mac Mini:~ adem$ scp ~/.ssh/id_dsa.pub adem@192.168.1.2:~/.ssh/authorized_keys2 -P 2222
</pre>
<p><strong>Important:</strong> Only ever copy the <strong>public</strong> key to other machines.  The private key, as the name suggests must be  kept secret, so only store it on computers you know are secure.</p>
<p>If you have several clients you want to connect to the server, you&#8217;ll need to first scp <code>id_dsa.pub</code> across to your server, before merging it into<code> authorized_keys2</code>:</p>
<pre>scp ~/.ssh/id_dsa.pub adem@192.168.1.2:~/id_rsa.pub
</pre>
<p>Server:</p>
<pre>cat ~/id_rsa.pub &gt; ~/.ssh/authorized_keys2
rm ~/id_rsa.pub
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ardweb.co.uk/2011/03/24/passwordless-logins-with-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

