<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>egloo &#187; ssh</title>
	<atom:link href="http://egloo.wordpress.com/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://egloo.wordpress.com</link>
	<description>Linux Sysadmin Blog</description>
	<lastBuildDate>Sat, 18 Apr 2009 19:35:52 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='egloo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/4f738d3a8dae6c0af9ecb7fb5c48f4a5?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>egloo &#187; ssh</title>
		<link>http://egloo.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://egloo.wordpress.com/osd.xml" title="egloo" />
		<item>
		<title>Connect Through SSH Without a Password</title>
		<link>http://egloo.wordpress.com/2008/12/10/connect-through-ssh-without-a-password/</link>
		<comments>http://egloo.wordpress.com/2008/12/10/connect-through-ssh-without-a-password/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 15:29:36 +0000</pubDate>
		<dc:creator>pcabrerat</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[RSA]]></category>

		<guid isPermaLink="false">http://egloo.wordpress.com/?p=227</guid>
		<description><![CDATA[One day, you will find yourself trying to execute  a command on a remote UNIX box without the need of typing the password. The basis of using this technique relies on public keys which are a kind of digital signatures.
Let&#8217;s supose we have a server named &#8220;Mailserver&#8221; and another server called &#8220;Monitor&#8221; and you want Monitor [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egloo.wordpress.com&blog=4102430&post=227&subd=egloo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft size-thumbnail wp-image-228" title="lockpick" src="http://egloo.files.wordpress.com/2008/12/lock-picking-5.jpg?w=105&#038;h=95" alt="lockpick" width="105" height="95" />One day, you will find yourself trying to execute  a command on a remote UNIX box without the need of typing the password. The basis of using this technique relies on public keys which are a kind of digital signatures.</p>
<p>Let&#8217;s supose we have a server named &#8220;<strong>Mailserver</strong>&#8221; and another server called &#8220;<strong>Monitor</strong>&#8221; and you want Monitor to connect every 30 minutes to Mailserver and verify the health of some services.</p>
<p>Anyway, here is the quick-guide:</p>
<p>First of all connect to <strong>Monitor </strong>with the user of you choice.</p>
<p>Then,  type:</p>
<p><code>ssh-keygen -t rsa</code><br />
 This command will create the RSA public key of the current user. You will be asked to type a passphrase but it&#8217;s not necesary at all; You can just ignore it.</p>
<p>When the command finishes execution, a message will appear telling you the location of the new files. In most cases it is placed in the <em>.ssh/</em> directory inside your <em>home/ </em>path.</p>
<p>Next, you&#8217;ll have to copy the public they to the <em>authorized_keys2 </em>file on the remote server (in this case <strong>Mailserver</strong>). To make it simple, here is the command (Remember to substitute user and hostname with your own):</p>
<p><code>scp ~/.ssh/id_rsa.pub user@hostname:~/.ssh/authorized_keys2</code><br />
This will the last time you&#8217;ll prompted to type the password. When the transfer finishes, you should be able to ssh from <em>Monitor </em>to <em>Mailserver </em>without being prompted for a pass. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>NOTE</strong>: On some UNIX like Solaris the default location of the public-keys can vary from system to system.</p>
<p><strong>NOTE 2</strong>: You must have <em><strong>RSAAuthentication yes</strong></em> in your <em>/etc/ssh/sshd_config </em>file. On many Linux installations this setting is commented out in a default install.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egloo.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egloo.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egloo.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egloo.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egloo.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egloo.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egloo.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egloo.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egloo.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egloo.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egloo.wordpress.com&blog=4102430&post=227&subd=egloo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://egloo.wordpress.com/2008/12/10/connect-through-ssh-without-a-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcabrerat</media:title>
		</media:content>

		<media:content url="http://egloo.files.wordpress.com/2008/12/lock-picking-5.jpg?w=105" medium="image">
			<media:title type="html">lockpick</media:title>
		</media:content>
	</item>
		<item>
		<title>Connection closed by remote host: ssh_exchange_identification</title>
		<link>http://egloo.wordpress.com/2008/10/09/connection-closed-by-remote-host-ssh_exchange_identification/</link>
		<comments>http://egloo.wordpress.com/2008/10/09/connection-closed-by-remote-host-ssh_exchange_identification/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 18:53:01 +0000</pubDate>
		<dc:creator>pcabrerat</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://egloo.wordpress.com/?p=161</guid>
		<description><![CDATA[Often when a process that uses SSH runs in a regular basis, you may get a &#8220;Connection closed by remote host&#8221; error.
For example, in my case I was using a Nagios based monitor that needed to connect to a group of hosts and, from time to time I got bursts of this error when trying [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egloo.wordpress.com&blog=4102430&post=161&subd=egloo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft size-full wp-image-162" title="ssh_connection" src="http://egloo.files.wordpress.com/2008/10/untitled.png?w=177&#038;h=170" alt="" width="177" height="170" />Often when a process that uses SSH runs in a regular basis, you may get a &#8220;<strong>Connection closed by remote host</strong>&#8221; error.</p>
<p>For example, in my case I was using a <a href="http://nagios.org">Nagios </a>based monitor that needed to connect to a group of hosts and, from time to time I got bursts of this error when trying to access the monitored machines.</p>
<p>This is an example of the log file:</p>
<p><code>10 13:43:02  hoard04 [2]: Protocol error. ssh is complaining, see next<br />
message. #d83bb35 (ssh_common.c 427)<br />
10 13:43:02  hoard04 [2]: ssh_exchange_identification: Connection<br />
closed by remote host</code></p>
<p>Even though the problem solves automatically by just ingnoring it for a while (really) I prefer to fix the problem rather than the symptoms, so with a little help from google I came up with the right solution.</p>
<p>This problem happens when the server hits the <strong>MaxStartups </strong>limit in the <strong>/etc/ssh/sshd_config</strong> file. This value acts as a security measure if for example someone tries to compromise your server with a <a href="http://en.wikipedia.org/wiki/DoS">DoS</a> attack. By default its set to 10 so its relatively easy for SSH to get stuck at 10 connections.</p>
<p>Anyway, to solve the issue you just have to edit the mentioned file and bump the <strong>MaxStartups </strong>limit to, say 25 or 50 if you need a lot of connections.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egloo.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egloo.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egloo.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egloo.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egloo.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egloo.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egloo.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egloo.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egloo.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egloo.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egloo.wordpress.com&blog=4102430&post=161&subd=egloo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://egloo.wordpress.com/2008/10/09/connection-closed-by-remote-host-ssh_exchange_identification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcabrerat</media:title>
		</media:content>

		<media:content url="http://egloo.files.wordpress.com/2008/10/untitled.png" medium="image">
			<media:title type="html">ssh_connection</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Message for SSH logins</title>
		<link>http://egloo.wordpress.com/2008/10/08/custom-message-for-ssh-logins/</link>
		<comments>http://egloo.wordpress.com/2008/10/08/custom-message-for-ssh-logins/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 14:46:53 +0000</pubDate>
		<dc:creator>pcabrerat</dc:creator>
				<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://egloo.wordpress.com/?p=138</guid>
		<description><![CDATA[If you ever wanted to show a message anytime someone logs to your server through SSH, here you have the how-to:
You will need root access to the server.
Login as root and use your favorite editor to modify the /etc/motd file. For this example I&#8217;m using vi.
# vi /etc/motd
Now type in the message you wish all [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egloo.wordpress.com&blog=4102430&post=138&subd=egloo&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignleft size-full wp-image-139" title="logo" src="http://egloo.files.wordpress.com/2008/10/logo.jpg?w=134&#038;h=140" alt="" width="134" height="140" />If you ever wanted to show a message anytime someone logs to your server through SSH, here you have the how-to:</p>
<p>You will need root access to the server.</p>
<p>Login as root and use your favorite editor to modify the /etc/motd file. For this example I&#8217;m using vi.</p>
<p><code># vi /etc/motd</code></p>
<p>Now type in the message you wish all users to see once they login to your server. Lets try something like this:</p>
<p><em>If you are not an authorized user for this server<br />
or you are a hacker trying to access confidential info, think before you type.<br />
Maybe join the human race and refrain from hacking it?  See<br />
&#8220;Schlindler&#8217;s List&#8221; part where the German commandant is shooting<br />
prisoners in the prsion year &#8220;because he can&#8221;.  Schlindler tells him<br />
&#8220;true power is in not doing evil even though you can.&#8221;<br />
You know, no one crushed you under their boot when you were a<br />
baby, although they certainly could have&#8230;  With great power comes great responsibility.</em></p>
<p>OK, Now you&#8217;re done editing the file, type <strong>Esc </strong>to enter command mode and then type <code>:wq </code>to save the changes</p>
<p>Logout from SSH, then log back again and you will see your custom message.</p>
<p>Please note that the message will be displayed <strong>AFTER </strong>people log in. If you want to show a message BEFORE, you might want to edit your sshd_config file.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/egloo.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/egloo.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/egloo.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/egloo.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/egloo.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/egloo.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/egloo.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/egloo.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/egloo.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/egloo.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=egloo.wordpress.com&blog=4102430&post=138&subd=egloo&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://egloo.wordpress.com/2008/10/08/custom-message-for-ssh-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">pcabrerat</media:title>
		</media:content>

		<media:content url="http://egloo.files.wordpress.com/2008/10/logo.jpg" medium="image">
			<media:title type="html">logo</media:title>
		</media:content>
	</item>
	</channel>
</rss>