<?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>Matheus Bratfisch &#187; shell</title>
	<atom:link href="http://www.matbra.com/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matbra.com</link>
	<description>&#34;Cogito ergo sum&#34;</description>
	<lastBuildDate>Tue, 20 Dec 2011 00:03:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Install and configure SSH server to be safer.</title>
		<link>http://www.matbra.com/en/2009/05/20/instalar-e-deixar-seu-servidor-ssh-mais-seguro/</link>
		<comments>http://www.matbra.com/en/2009/05/20/instalar-e-deixar-seu-servidor-ssh-mais-seguro/#comments</comments>
		<pubDate>Thu, 21 May 2009 00:40:47 +0000</pubDate>
		<dc:creator>Matheus (X-warrior) Bratfisch</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[segurança]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.matbra.com/?p=264</guid>
		<description><![CDATA[Good night, To install ssh server in Ubuntu use: $ sudo apt-get install openssh-server To let it safer edit /etc/ssh/sshd_config $ sudo vi /etc/ssh/sshd_config Than change the lines: AllowUsers USER AllowGroups GROUP_USER PasswordAuthentication yes MaxStartups 2:100:2 Port XXX # Change the port What MaxStartups do? Specify the number of un authenticated connections in server. The [...]]]></description>
			<content:encoded><![CDATA[<p>Good night, </p>
<p>To install ssh server in Ubuntu use: </p>
<blockquote><p>
$ sudo apt-get install openssh-server
</p></blockquote>
<p>To let it safer edit /etc/ssh/sshd_config</p>
<blockquote><p>
$ sudo vi /etc/ssh/sshd_config
</p></blockquote>
<p>Than change the lines:</p>
<blockquote><p>AllowUsers USER<br />
AllowGroups GROUP_USER<br />
PasswordAuthentication yes<br />
MaxStartups 2:100:2<br />
Port XXX # Change the port</p></blockquote>
<p>What MaxStartups do? Specify the number of un authenticated connections in server. The syntax is start:percent:max. Example: 10:50:20. When it gets to 10 connections it will start with the percent. So every new connection will have 50% of chance to be automaticlly refused. When it gets to 20. It will denied ALL the new connections. </p>
<p>If you want, you can ask for a second password, if you type it wrong, it will close the connection:</p>
<p>Edit /home/user/.profile</p>
<blockquote><p>echo Put your password<br />
read senha<br />
if [ $senha == "SOMETHING" ]<br />
then<br />
                        # CODES THAT ALREADY ARE AT .profile<br />
else<br />
exit<br />
fi</p></blockquote>
<p>With this you can do some tricks, to create a new RANDOM password every time somebody connect and send it to your e-mail. So you will need to put your normal password, than access your e-mail account, verify the new password and type it. </p>
<p>Best Regards,<br />
Matheus</p>
<p>References:<br />
<a href="http://under-linux.org/f43117-comando-su-2" target="_blank">Desabilitar Comando SU</a><br />
<a href="http://opensolaris.org/jive/thread.jspa?messageID=248856"  target="_blank">Informação MaxStartups</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.matbra.com/en/2009/05/20/instalar-e-deixar-seu-servidor-ssh-mais-seguro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

