<?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>Fernando Luis &#187; ssh</title>
	<atom:link href="http://www.fernandoluis.com/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.fernandoluis.com</link>
	<description>Fernando Luis security linux  debian fotografia</description>
	<lastBuildDate>Wed, 17 Aug 2011 12:25:54 +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>Evitar ataques de fuerza fruta en ssh</title>
		<link>http://www.fernandoluis.com/evitar-ataques-de-fuerza-fruta-en-ssh/2009/10</link>
		<comments>http://www.fernandoluis.com/evitar-ataques-de-fuerza-fruta-en-ssh/2009/10#comments</comments>
		<pubDate>Thu, 22 Oct 2009 14:32:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Seguridad]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.fernandoluis.com/?p=407</guid>
		<description><![CDATA[<p>¿ Estás cansado de  continuos ataques contra tu ssh ?</p>
<p>Iptables te dá la solución:</p>
<p>iptables -I INPUT -p tcp &#8211;dport 22 -i eth0 -m state &#8211;state NEW -m recent &#8211;set</p>
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent--update --seconds 240 --hitcount 4 -j DROP


En este ejemplo, estaremos marcando las nuevas [...]]]></description>
			<content:encoded><![CDATA[<p>¿ Estás cansado de  continuos ataques contra tu ssh ?</p>
<p>Iptables te dá la solución:</p>
<blockquote><p><span style="font-family: verdana; font-size: 100%;">iptables -I INPUT -p tcp &#8211;dport 22 -i eth0 -m state &#8211;state NEW -m recent &#8211;set</span></p>
<pre style="font-family: verdana;"><span style="font-size: 100%;">iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent--update --seconds 240 --hitcount 4 -j DROP
</blockquote>

En este ejemplo, estaremos marcando las nuevas conexiones de ssh  que se produzcan, y en el caso de llegar a 4 desde la misma IP, denegaría el acceso durante 240 segundos.

</span>
<pre style="font-family: verdana;"><span style="font-size: 100%;">
</span></pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fernandoluis.com/evitar-ataques-de-fuerza-fruta-en-ssh/2009/10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Habilitando SSH en dispositivo MyBook</title>
		<link>http://www.fernandoluis.com/habilitando-ssh-en-dispositivo-mybook/2009/10</link>
		<comments>http://www.fernandoluis.com/habilitando-ssh-en-dispositivo-mybook/2009/10#comments</comments>
		<pubDate>Wed, 21 Oct 2009 07:23:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.fernandoluis.com/?p=401</guid>
		<description><![CDATA[<p>Hace poco me encontré en la situación, de añadir una segunda IP en un disco duro externo MyBook.Para mi sorpresa, el interface web no permite este tipo de cambios, pero como este tipo de dispositivos suelen estar basados en linux, vi que la solución era posible , al igual que ya lo habían sido La [...]]]></description>
			<content:encoded><![CDATA[<p>Hace poco me encontré en la situación, de añadir una segunda IP en un disco duro externo MyBook.Para mi sorpresa, el interface web no permite este tipo de cambios, pero como este tipo de dispositivos suelen estar basados en linux, vi que la solución era posible , al igual que ya lo habían sido La Fonera, Woxter Icube&#8230;.</p>
<p>Según cuentan en el blog de martin<a href="http://martin.hinner.info/mybook/sshaccess.php">http://martin.hinner.info/mybook/sshaccess.php</a> simplemente habría que:</p>
<p>1.-  http:///auth/firmware_upgrade.pl?fwserver=martin.hinner.info/mybook/firmware.php</p>
<p>Si tienes problemas a la hora de conectarte, puedes coger el siguiente script y publicarlo en un servidor web, y cambiar la URL para que apunte al servidor local:</p>
<p>http:///auth/firmware_upgrade.pl?fwserver=/fw.sh</p>
<p><a href="http://martin.hinner.info/mybook/sshaccess.php"><br />
</a><br />
<a href="http://martin.hinner.info/mybook/sshaccess.php"></a></p>
<blockquote><p><a href="http://martin.hinner.info/mybook/sshaccess.php">#!/bin/sh<br />
# Script fw.sh </a></p>
<p>echo &#8216;#!/bin/sh&#8217; &gt;/var/upgrade/upgrade1.sh<br />
chmod 755 /var/upgrade/upgrade1.sh</p>
<p>KEYGEN=/usr/bin/ssh-keygen<br />
SSHD=/usr/sbin/sshd<br />
RSA1_KEY=/etc/ssh_host_key<br />
RSA_KEY=/etc/ssh_host_rsa_key<br />
DSA_KEY=/etc/ssh_host_dsa_key</p>
<p>do_rsa1_keygen() {<br />
if [ ! -s $RSA1_KEY ]; then<br />
echo -n $&#8221;Generating SSH1 RSA host key: &#8221;<br />
if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C &#8221; -N &#8221; &gt;&amp;/dev/null; then<br />
chmod 600 $RSA1_KEY<br />
chmod 644 $RSA1_KEY.pub<br />
echo<br />
else<br />
echo<br />
exit 1<br />
fi<br />
fi<br />
}</p>
<p>do_rsa_keygen() {<br />
if [ ! -s $RSA_KEY ]; then<br />
echo -n $&#8221;Generating SSH2 RSA host key: &#8221;<br />
if $KEYGEN -q -t rsa -f $RSA_KEY -C &#8221; -N &#8221; &gt;&amp;/dev/null; then<br />
chmod 600 $RSA_KEY<br />
chmod 644 $RSA_KEY.pub<br />
echo<br />
else<br />
echo<br />
exit 1<br />
fi<br />
fi<br />
}</p>
<p>do_rsa1_keygen<br />
do_rsa_keygen</p>
<p>/usr/bin/passwd -d root<br />
/usr/sbin/sshd &amp;<br />
rm -f /tmp/active_upgrade<br />
exit 0</p></blockquote>
<p>2.- Con el paso anterior, ya habremos habilitado el servicio de SSH en el dispositivo.Para conectarnos a el, debermos usar   el usuario  que trae por defecto, (usuario admin con la contraseña 123456 ).<br />
Una vez conectado, nos convertimos en usuario root con <em>su -</em> , y ejecutaremos lo siguiente para que los cambios sean permanentes, y el servicio sshd arranque automaticamente:</p>
<blockquote><p>echo &#8220;::sysinit:/usr/sbin/sshd &#8221; &gt;&gt; /etc/inittab</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.fernandoluis.com/habilitando-ssh-en-dispositivo-mybook/2009/10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

