<?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>Tim Bowler &#187; ssh attacks</title>
	<atom:link href="http://timothybowler.com/tag/ssh-attacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://timothybowler.com</link>
	<description>Certified Scrum Master &#124; Certified Scrum Practitioner &#124; Agile Coach &#124; Agile Practitioner</description>
	<lastBuildDate>Sat, 19 Dec 2009 16:14:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SSH security</title>
		<link>http://timothybowler.com/2008/08/10/ssh-security/</link>
		<comments>http://timothybowler.com/2008/08/10/ssh-security/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 22:26:22 +0000</pubDate>
		<dc:creator>Tim Bowler</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh attacks]]></category>
		<category><![CDATA[ssh configure]]></category>
		<category><![CDATA[sshd]]></category>

		<guid isPermaLink="false">http://timothybowler.com/2008/08/10/ssh-security/</guid>
		<description><![CDATA[Over the last few weeks the server logs, especially /var/log/messages seems to be filled with consistent ssh dictionary attacks. Of course this cannot continue, so what do you do to prevent it?
Well there are a few things:

1. Setup the firewall to handle them
2. Installing deny hosts
3. Configure your ssh daemon properly
4. Set up proper accounts [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few weeks the server logs, especially /var/log/messages seems to be filled with consistent ssh dictionary attacks. Of course this cannot continue, so what do you do to prevent it?</p>
<p>Well there are a few things:</p>
<p><span id="more-42"></span></p>
<p>1. Setup the firewall to handle them</p>
<p>2. Installing deny hosts</p>
<p>3. Configure your ssh daemon properly</p>
<p>4. Set up proper accounts for people</p>
<p>The methods that I deploy are points 1, 3 and 4.</p>
<p><strong>Configuring SSH </strong></p>
<p>In the sshd_conf do the following:</p>
<p>-  change the port number: <strong>port 9999</strong></p>
<p>- Allow no password auth: <strong>PasswordAuthentication no</strong></p>
<p>- Allow public key auth: <strong>PubkeyAuthentication yes</strong></p>
<p>- Only allow user accounts that belong to a group: <strong>AllowGroups groupName</strong></p>
<p>By setting the above you have place a lot of restrictions on the who can access your server using ssh.</p>
<p><strong>Configure your firewall iptables in linux<br />
</strong></p>
<pre class="brush: bash; light: true; toolbar: true;">iptables -N SSH_CHECK
iptables -A INPUT -p tcp --dport 9999 -m state --state NEW -j SSH_CHECK
iptables -A SSH_CHECK -m recent --set --name SSH
iptables -A SSH_CHECK -m recent --update --minutes 60 --hitcount 4 --name SSH -j DROP</pre>
<p>Finally  the last thing is to configure the user accounts that can access the server. It is strongly recommended to add the users to the sudousers if they require any specialist privileges.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Ftimothybowler.com%2F2008%2F08%2F10%2Fssh-security%2F';
  addthis_title  = 'SSH+security';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://timothybowler.com/2008/08/10/ssh-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
