<?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>Agence de Développement Informatique du Nord &#187; Hacks</title>
	<atom:link href="http://blog.adin.pro/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>SSH Read from socket failed: Connection reset by peer</title>
		<link>http://blog.adin.pro/2013-07-07/ssh-read-from-socket-failed-connection-reset-by-peer/</link>
		<comments>http://blog.adin.pro/2013-07-07/ssh-read-from-socket-failed-connection-reset-by-peer/#comments</comments>
		<pubDate>Sun, 07 Jul 2013 07:32:32 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[LXC]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=268</guid>
		<description><![CDATA[<p>After installing a container with lxc I wasn&#8217;t able to connect via ssh to my container, I get the following message : Network works normally, I can ping, hotst both direction and I can get pages from apache&#8217;s container from &#8230; <a href="http://blog.adin.pro/2013-07-07/ssh-read-from-socket-failed-connection-reset-by-peer/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-07-07/ssh-read-from-socket-failed-connection-reset-by-peer/">SSH Read from socket failed: Connection reset by peer</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>After installing a container with lxc I wasn&#8217;t able to connect via ssh to my container, I get the following message :</p>
<pre class="brush: bash; title: ; notranslate">
root@ns313:~# ssh 10.50.10.10
Read from socket failed: Connection reset by peer
</pre>
<p>Network works normally, I can ping, hotst both direction and I can get pages from apache&#8217;s container from the dom0.</p>
<p>I tried to connect to ssh from container, in local and I get the same error.</p>
<pre class="brush: bash; title: ; notranslate">
root@container:/etc/ssh#ssh 10.50.10.10 -l root
Read from socket failed: Connection reset by peer
</pre>
<p>Strange, first time ssh doesn&#8217;t work on any machine.<br />
Try restart sshd</p>
<pre class="brush: bash; title: ; notranslate">
root@container:/etc/ssh# /etc/init.d/ssh restart
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
[....] Restarting OpenBSD Secure Shell server: sshdCould not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
. ok 
</pre>
<p>SSH keys are missing, to fix it, run this command :</p>
<pre class="brush: bash; title: ; notranslate">
root@container:/etc/ssh# ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-07-07/ssh-read-from-socket-failed-connection-reset-by-peer/">SSH Read from socket failed: Connection reset by peer</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-07-07/ssh-read-from-socket-failed-connection-reset-by-peer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH How to connect without password</title>
		<link>http://blog.adin.pro/2013-07-06/ssh-how-to-connect-without-passowrd/</link>
		<comments>http://blog.adin.pro/2013-07-06/ssh-how-to-connect-without-passowrd/#comments</comments>
		<pubDate>Sat, 06 Jul 2013 12:33:37 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=261</guid>
		<description><![CDATA[<p>A classic hack for linux users, connect via ssh without password. First, on your client, generate public key keep ~/.ssh/id_rsa by default. Copy public key (~/.ssh/id_rsa.pub) from your client to the file ~/.ssh/authorized_keys2 on the server with the ssh-copy-id binary. &#8230; <a href="http://blog.adin.pro/2013-07-06/ssh-how-to-connect-without-passowrd/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-07-06/ssh-how-to-connect-without-passowrd/">SSH How to connect without password</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>A classic hack for linux users, connect via ssh without password.</p>
<p>First, on your client, generate public key</p>
<pre class="brush: bash; title: ; notranslate">
ssh-key-gen -t rsa
</pre>
<p>keep ~/.ssh/id_rsa by default.</p>
<p>Copy public key (~/.ssh/id_rsa.pub) from your client to the file ~/.ssh/authorized_keys2 on the server with the ssh-copy-id binary.</p>
<p>Then edit your ~/.ssh/config file on client side to custom your params:</p>
<pre class="brush: bash; title: ; notranslate">
Host dev
  HostName dev.domain.com
  Port 22
  User root
</pre>
<p>Finaly, you can add an alias in your ~/.bashrc</p>
<pre class="brush: bash; title: ; notranslate">
alias dev='ssh dev'
</pre>
<p>Now, to launche a ssh connection, just run</p>
<pre class="brush: bash; title: ; notranslate">
dev
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-07-06/ssh-how-to-connect-without-passowrd/">SSH How to connect without password</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-07-06/ssh-how-to-connect-without-passowrd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robots.txt disallow all</title>
		<link>http://blog.adin.pro/2013-05-09/robots-txt-disallow-all/</link>
		<comments>http://blog.adin.pro/2013-05-09/robots-txt-disallow-all/#comments</comments>
		<pubDate>Thu, 09 May 2013 08:56:52 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[robots.txt]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=180</guid>
		<description><![CDATA[<p>To prevent google to reference your dev website, you can add a robots.txt file to your web root directory and fill it with The &#8220;User-agent: *&#8221; means that the file applies to all robots. The &#8220;Disallow: /&#8221; means the robot &#8230; <a href="http://blog.adin.pro/2013-05-09/robots-txt-disallow-all/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-09/robots-txt-disallow-all/">Robots.txt disallow all</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>To prevent google to reference your dev website, you can add a robots.txt file to your web root directory and fill it with</p>
<pre class="brush: php; title: ; notranslate">
User-agent: *
Disallow: /
</pre>
<p>The &#8220;User-agent: *&#8221; means that the file applies to all robots. The &#8220;Disallow: /&#8221; means the robot will not visit any pages on the website.</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-09/robots-txt-disallow-all/">Robots.txt disallow all</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-05-09/robots-txt-disallow-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ERROR: This RRD was created on another architecture</title>
		<link>http://blog.adin.pro/2013-02-24/error-this-rrd-was-created-on-another-architecture/</link>
		<comments>http://blog.adin.pro/2013-02-24/error-this-rrd-was-created-on-another-architecture/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 14:42:01 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[rrdtool]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=113</guid>
		<description><![CDATA[<p>You are migrating cacti from a 32bits machine to a 64bits machine and you get this error message : &#8220;ERROR: This RRD was created on another architecture&#8221; ? To fix it, you need to convert on your 32bits machine the &#8230; <a href="http://blog.adin.pro/2013-02-24/error-this-rrd-was-created-on-another-architecture/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-24/error-this-rrd-was-created-on-another-architecture/">ERROR: This RRD was created on another architecture</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You are migrating cacti from a 32bits machine to a 64bits machine and you get this error message : &#8220;ERROR: This RRD was created on another architecture&#8221; ?</p>
<p>To fix it, you need to convert on your 32bits machine the .rrd file to xml files.</p>
<pre class="brush: bash; title: ; notranslate">
    for i in `ls *.rrd`; do rrdtool dump $i &gt; $i.xml; done
</pre>
<p>And on your 64bits machine, transform your XML files to rrd files :</p>
<pre class="brush: bash; title: ; notranslate">
for i in `ls *.xml`; do rrdtool restore $i `echo $i |sed s/.xml//g`; done
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-24/error-this-rrd-was-created-on-another-architecture/">ERROR: This RRD was created on another architecture</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-02-24/error-this-rrd-was-created-on-another-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE blocking cookies in frames</title>
		<link>http://blog.adin.pro/2012-10-23/ie-blocking-cookies-in-frames/</link>
		<comments>http://blog.adin.pro/2012-10-23/ie-blocking-cookies-in-frames/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 12:56:36 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[Frame]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=4</guid>
		<description><![CDATA[<p>For “security” reasons (stuff related to P3P Platform for Privacy Preferences), Internet Explorer does not accept cookies for a site inside a frame. But you can force him to accept cookies by adding this in your http header PHP: ASP.NET: &#8230; <a href="http://blog.adin.pro/2012-10-23/ie-blocking-cookies-in-frames/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-10-23/ie-blocking-cookies-in-frames/">IE blocking cookies in frames</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>For “security” reasons (stuff related to P3P Platform for Privacy Preferences), Internet Explorer does not accept cookies for a site inside a frame. But you can force him to accept cookies by adding this in your http header</p>
<p>PHP:</p>
<pre class="brush: php; title: ; notranslate">
header('P3P:CP=&quot;IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT&quot;');
</pre>
<p>ASP.NET:</p>
<pre class="brush: csharp; title: ; notranslate">
HttpContext.Current.Response.AddHeader(&quot;p3p&quot;,&quot;CP=\&quot;IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\&quot;&quot;);
</pre>
<p>Django:</p>
<pre class="brush: ruby; title: ; notranslate">
response = render_to_response('mytemplate.html')
response[&quot;P3P&quot;] = 'CP=&quot;IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT&quot;'
</pre>
<p>JSP:</p>
<pre class="brush: java; title: ; notranslate">
response.addHeader(&quot;P3P&quot;,&quot;CP=\&quot;IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\&quot;&quot;)
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-10-23/ie-blocking-cookies-in-frames/">IE blocking cookies in frames</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2012-10-23/ie-blocking-cookies-in-frames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
