<?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>Sentido Web &#187; ssh</title>
	<atom:link href="http://sentidoweb.com/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://sentidoweb.com</link>
	<description>Desarrollo web, HTML, CSS, Javascript, PHP, MySQL</description>
	<lastBuildDate>Tue, 10 Apr 2012 01:02:09 +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>Librería SSH para PHP</title>
		<link>http://sentidoweb.com/2010/01/28/libreria-ssh-para-ph.php</link>
		<comments>http://sentidoweb.com/2010/01/28/libreria-ssh-para-ph.php#comments</comments>
		<pubDate>Thu, 28 Jan 2010 16:16:13 +0000</pubDate>
		<dc:creator>displaynone</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://sentidoweb.com/?p=2143</guid>
		<description><![CDATA[Para aquellos que quieran desarrollar una aplicación que tenga acceso mediante SSH, le vendrá bien esta librería, aunque con la limitación de que sólo admite SSH1. Esto puede ser un impedimento, pero la librería que hay para SSH2 es PECL, lo cual también puede ser un impedimento a la hora de instalar. require_once &#40;'ssh_in_php.php'&#41;; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Para aquellos que quieran desarrollar una aplicación que tenga acceso mediante SSH, le vendrá bien esta librería, aunque con la limitación de que sólo admite SSH1. Esto puede ser un impedimento, pero la librería que hay para <a href="http://php.net/manual/en/book.ssh2.php">SSH2</a> es PECL, lo cual también puede ser un impedimento a la hora de instalar.</p>
<pre><code><pre class="php"><span style="color: #723b00;">require_once</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'ssh_in_php.php'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #3E6D8F;">$host</span> = <span style="color: #ff0000;">"127.0.0.1"</span>;
<span style="color: #3E6D8F;">$port</span> = <span style="color: #cc66cc;">22</span>;
<span style="color: #3E6D8F;">$user</span> = <span style="color: #ff0000;">"user"</span>;
<span style="color: #3E6D8F;">$password</span> = <span style="color: #ff0000;">"pass"</span>;
&nbsp;
try <span style="color: #66cc66;">&#123;</span>
    <span style="color: #3E6D8F;">$ssh</span> = <span style="color: #000000; font-weight: bold;">new</span> SSH_in_PHP<span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$host</span>,<span style="color: #3E6D8F;">$port</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #3E6D8F;">$ssh</span>-&gt;<span style="color: #006600;">connect</span><span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$user</span>,<span style="color: #3E6D8F;">$password</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #3E6D8F;">$cycle</span> = <span style="color: #000000; font-weight: bold;">true</span>;
    <span style="color: #723b00;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$cycle</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3E6D8F;">$data</span> = <span style="color: #3E6D8F;">$ssh</span>-&gt;<span style="color: #006600;">read</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #3E6D8F;">$data</span>;
        <span style="color: #723b00;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ereg"><span style="color: #000066;">ereg</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">$</span>'</span>,<span style="color: #3E6D8F;">$data</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #3E6D8F;">$cycle</span> = <span style="color: #000000; font-weight: bold;">false</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #3E6D8F;">$ssh</span>-&gt;<span style="color: #006600;">write</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"ls -al<span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #3E6D8F;">$cycle</span> = <span style="color: #000000; font-weight: bold;">true</span>;
    <span style="color: #723b00;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$cycle</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #3E6D8F;">$data</span> = <span style="color: #3E6D8F;">$ssh</span>-&gt;<span style="color: #006600;">read</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #3E6D8F;">$data</span>;
        <span style="color: #723b00;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/ereg"><span style="color: #000066;">ereg</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">$</span>'</span>,<span style="color: #3E6D8F;">$data</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #3E6D8F;">$cycle</span> = <span style="color: #000000; font-weight: bold;">false</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #3E6D8F;">$ssh</span>-&gt;<span style="color: #006600;">disconnect</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span> catch <span style="color: #66cc66;">&#40;</span>SSHException <span style="color: #3E6D8F;">$e</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">"An Exception Occured: {$e-&gt;getMessage()} ({$e-&gt;getCode()})<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
    <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">"Trace: <span style="color: #000099; font-weight: bold;">\n</span>"</span>;
    <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <a href="http://www.php.net/print_r"><span style="color: #000066;">print_r</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #3E6D8F;">$e</span>-&gt;<span style="color: #006600;">getTrace</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span>"</span>;
<span style="color: #66cc66;">&#125;</span></pre></code></pre>
<p><a href="http://www.phpclasses.org/browse/package/2477.html">SSH in PHP</a></p>]]></content:encoded>
			<wfw:commentRss>http://sentidoweb.com/2010/01/28/libreria-ssh-para-ph.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Consejos para configuraciones SSH</title>
		<link>http://sentidoweb.com/2007/04/03/consejos-para-configuraciones-ssh.php</link>
		<comments>http://sentidoweb.com/2007/04/03/consejos-para-configuraciones-ssh.php#comments</comments>
		<pubDate>Tue, 03 Apr 2007 23:00:00 +0000</pubDate>
		<dc:creator>displaynone</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh consejos]]></category>

		<guid isPermaLink="false">http://sentidoweb.com/2007/04/03/consejos-para-configuraciones-ssh.php</guid>
		<description><![CDATA[Aunque yo, la verdad, he tratado las conexiones SSH de resfilón, nunca está mal conocer algunos trucos para cuando tengamos que configurar nuestras conexiones SSH. Cambia el puerto: por defecto el puerto de escucha es el 22, cámbialo para que dificultar los ataques, sobre todo si es mayor a 1024, ya que la mayoría de [...]]]></description>
			<content:encoded><![CDATA[<p>Aunque yo, la verdad, he tratado las conexiones <a href="http://es.wikipedia.org/wiki/SSH">SSH</a> de resfilón, nunca está mal conocer algunos trucos para cuando tengamos que configurar nuestras conexiones SSH.</p>
<ul><li><strong>Cambia el puerto</strong>: por defecto el puerto de escucha es el 22, cámbialo para que dificultar los ataques, sobre todo si es mayor a 1024, ya que la mayoría de los scanners no admite valores tan altos.</li>
<li><strong>Admite solo el protocolo 2</strong>: SSH admite dos protocolos, permite tan solo el 2 ya que es más seguro.</li>
<li><strong>Permite solo usuarios específicos</strong>: no admitas al usuario <em>root</em> ya que es aumentar los riegos de ataque.</li>
<li><strong>Especifica tu propio aviso</strong>: si quieres que cualquier usuario pueda ver un aviso de acceso denegado crea tu propio fichero de texto que muestre el mensaje. Este punto no lo comprendo muy bien, está claro que me tengo que meter más a fondo con el SSH.</li>
<li><strong>Usa clave pública DSA</strong>: puedes usar para la autenticación claves públicas DSA en vez de usuario y contraseña.</li>
<li><strong>Usa TCP wrappers</strong>: permitiendo así conectarse solo a ciertos hosts.</li>
<li><strong>Usa iptables para permitir acceso a hosts</strong>: como alternativa a los TCP wrappers.</li>
<li><strong>Limita el acceso a periodos de tiempo</strong></li></ul>
<p><a href="http://enterprise.linux.com/enterprise/07/03/26/1423232.shtml?tid=129&#038;tid=100&#038;tid=35">Advanced SSH security tips and tricks</a></p>
<p>Vía / <a href="http://www.dzone.com/rsslinks/advanced_ssh_security_tips_and_tricks.html">dzone</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sentidoweb.com/2007/04/03/consejos-para-configuraciones-ssh.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

