<?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>Sascha Tayefeh&#039;s Homepage &#187; Linux</title>
	<atom:link href="http://www.tayefeh.de/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tayefeh.de</link>
	<description>Blogging about Information Technology</description>
	<lastBuildDate>Sun, 25 Jul 2010 17:16:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
			<div id="jquery_pagebar">
		
			<div id="pages">  <span id="number"> Navigation</span> <a href="http://www.tayefeh.de/tag/linux/feed/page/2/" title="Older Entries" >&raquo;</a></div>
			<div id="slider"></div>
		</div>
		
			<item>
		<title>Preventing SSH Brute Force Attacks</title>
		<link>http://www.tayefeh.de/2009/12/preventing-ssh-brute-force-attacks/</link>
		<comments>http://www.tayefeh.de/2009/12/preventing-ssh-brute-force-attacks/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 15:04:58 +0000</pubDate>
		<dc:creator>Sascha Tayefeh</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.tayefeh.de/?p=414</guid>
		<description><![CDATA[A short note on how to block brute force ssh attacks]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for a way to prevent ssh brute force attacks. Although they are not particularly dangerous if you have prohibited password login (which you should have done under any circumstances), they had been spamming my log files. Asking the almighty search engine for relief, I found a number of interesting articles about attack blocker, such as <a title="DenyHost" href="http://denyhosts.sourceforge.net/" target="_blank">DenyHost</a>.</p>
<p>I&#8217;ve just installed the package on my private OsX server via <a title="MacPorts" href="http://www.macports.org/" target="_blank">MacPorts</a>. However, it took me a while until I found the installation location of all required files. After having touched <code>/etc/hosts.deny</code> (the file used by denyhosts to store suspicious ips for tcp_wrappers to block them), copied <code>/opt/local/share/denyhosts/denyhosts.cfg-dist</code> to somewhere reasonable (e.g. <code>/etc/denyhosts.cfg</code>), modified it to my needs (added E-Mail etc.), I was able to test start <a title="DenyHost" href="http://denyhosts.sourceforge.net/" target="_blank">DenyHost</a> with:</p>
<p><code>sudo /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/denyhosts.py --config=/etc/denyhosts.cfg</code></p>
<p>I&#8217;ve got a nice email telling me that, deducing from my  <code>/var/log/secure.log</code> some IPs were now added to  <code>hosts.deny</code>. Furthermore, some interesting data have been stored in <code>/opt/local/share/denyhosts/data</code>.</p>
<p>However, I prefer <a title="DenyHost" href="http://denyhosts.sourceforge.net/" target="_blank">DenyHost</a> to be running in daemon mode and to synchronize with data collected from the cloud, so I inserted  <code>SYNC_SERVER = http://xmlrpc.denyhosts.net:9911</code> into <code>denyhosts.cfg</code> and started <a title="DenyHost" href="http://denyhosts.sourceforge.net/" target="_blank">DenyHost</a> with some additional options:</p>
<p><code>sudo /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/denyhosts.py --config=/etc/denyhosts.cfg --sync --daemon</code></p>
<p>And now I feel much more comfortable now.</p>
<p>Related Links:</p>
<ul>
<li><a href="http://www.howtoforge.com/preventing_ssh_dictionary_attacks_with_denyhosts" target="_blank">Preventing SSH Dictionary Attacks With DenyHosts</a></li>
<li><a href="http://denyhosts.sourceforge.net/" target="_blank">Denyhost</a></li>
<li><a href="http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/" target="_blank">Debian Linux Stop SSH User Hacking / Cracking Attacks with DenyHosts Software</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tayefeh.de/2009/12/preventing-ssh-brute-force-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Gimp &#8211; Tutorials</title>
		<link>http://www.tayefeh.de/2009/11/the-gimp-tutorials/</link>
		<comments>http://www.tayefeh.de/2009/11/the-gimp-tutorials/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 21:03:52 +0000</pubDate>
		<dc:creator>Sascha Tayefeh</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Black and White]]></category>
		<category><![CDATA[BW]]></category>
		<category><![CDATA[Gimp]]></category>
		<category><![CDATA[Grain]]></category>
		<category><![CDATA[Graphic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Noise]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.tayefeh.de/2009/11/the-gimp-tutorials/</guid>
		<description><![CDATA[The tutorials at http://www.gimp.org/tutorials/ are very useful. You may come to astonishing results following them. My favourite ones are http://www.gimp.org/tutorials/Color2BW/ (How to create good grayscale images from coloured ones) http://www.gimp.org/tutorials/Film_Grain/ (How to add film grain to make the image look somewhat vintage) http://www.gimpguru.org/Tutorials/FilmGrain/ (dito) Another nice tutorial that deals with creating vintage look using The [...]]]></description>
			<content:encoded><![CDATA[<p>The tutorials at <a title="http://www.gimp.org/tutorials/" href="http://www.gimp.org/tutorials/">http://www.gimp.org/tutorials/</a> are very useful. You may come to astonishing results following them. My favourite ones are</p>
<ul>
<li><a title="http://www.gimp.org/tutorials/Color2BW/" href="http://www.gimp.org/tutorials/Color2BW/">http://www.gimp.org/tutorials/Color2BW/</a> (How to create good grayscale images from coloured ones) </li>
<li><a title="http://www.gimp.org/tutorials/Film_Grain/" href="http://www.gimp.org/tutorials/Film_Grain/" target="_blank">http://www.gimp.org/tutorials/Film_Grain/</a> (How to add film grain to make the image look somewhat vintage) </li>
<li><a href="http://www.gimpguru.org/Tutorials/FilmGrain/" target="_blank">http://www.gimpguru.org/Tutorials/FilmGrain/</a> (dito)</li>
</ul>
<p>Another nice tutorial that deals with creating vintage look using The Gimp is here:</p>
<p><a title="http://www.linuxjournal.com/article/6750" href="http://www.linuxjournal.com/article/6750">http://www.linuxjournal.com/article/6750</a></p>
<p>It focuses on more subtle filtering.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tayefeh.de/2009/11/the-gimp-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto Get MPICH2 run on a Linux Debian Lenny Machine</title>
		<link>http://www.tayefeh.de/2009/08/howto-get-mpich2-run-on-a-linux-debian-lenny-machine/</link>
		<comments>http://www.tayefeh.de/2009/08/howto-get-mpich2-run-on-a-linux-debian-lenny-machine/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 17:52:05 +0000</pubDate>
		<dc:creator>Sascha Tayefeh</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mpich]]></category>
		<category><![CDATA[mpich2]]></category>
		<category><![CDATA[parallel computing]]></category>

		<guid isPermaLink="false">http://www.tayefeh.de/?p=356</guid>
		<description><![CDATA[HowTo overcome MPICH2 problems - here: Linux Debian Lenny did not allow connections between nodes]]></description>
			<content:encoded><![CDATA[<p>When trying to get <a href="http://www.mcs.anl.gov/research/projects/mpich2/" target="_blank">MPICH2</a> working on two <a href="http://www.debian.org/releases/lenny/" target="_blank">Debian Lenny</a> machine, I ran into a problem. Actually, <span style="font-family: Courier New,Courier,mono;">/etc/hosts</span> was misconfigured. It was necessary to turn</p>
<p style="font-family: Courier New,Courier,mono;">127.0.1.1    myMachine.myDomain    myMachine</p>
<p>which caused heavy problems when trying to connect from a slave node to the master node using</p>
<p style="font-family: Courier New,Courier,mono;">mpd &#8211;host [masterhost] &#8211;p [masterport] &amp;</p>
<p>on the slave into</p>
<p style="font-family: Courier New,Courier,mono;">192.168.1.39    myMachine.myDomain    myMachine</p>
<p>which was the actual IP address given to that machine by my DHCP server. I had to repeat this for all nodes using the appropriate IP of the node.</p>
<p>I figured out this problem by reading chapter &#8220;Troubleshooting MPDs -> Debugging host/network configuration&#8221; of the <a href="http://www.mcs.anl.gov/research/projects/mpich2/documentation/index.php?s=docs" target="_blank">mpich2-installationguide.pdf</a> &#8211; which is worth reading anyway. I learned that running into trouble in such a situation, the command</p>
<p style="font-family: Courier New,Courier,mono;">mpdcheck</p>
<p>or even</p>
<p style="font-family: Courier New,Courier,mono;">mpdcheck -l</p>
<p>is a great tool, since it determines potential host of network configuration problems. There is plenty of debugging information in that manual, so you should always give it a try before searching the internet.</p>
<p>So here is what I did in order to build MPICH2 from scratch:</p>
<ol>
<li>First, I configured ssh in such a manner, that I was able to logon to any host without using I password. In order to achieve this condition, I created a secret key using ssh-keygen and copied the public key to all slaves. I did not use an empty passphrase, but I started ssh-agent in order to enable quite logon</li>
<li>I got the source from the <a href="http://www.mcs.anl.gov/research/projects/mpich2/index.php" target="_blank">MPICH2 project homepage </a>and unzip/tar-ed to some temporary directory</li>
<li>cd there and build it using <span style="font-family: Courier New,Courier,mono;">./configure &#8211;prefix=/opt/mpich2</span> . (However, I preferred building MPICH2 using the <a href="http://software.intel.com/en-us/intel-compilers/" target="_blank">Intel Compilers</a>, thus, I set environmental variables CC and CXX:  <span style="font-family: Courier New,Courier,mono;">export CXX=icpc &amp;&amp; export CC=icc</span> . This step is, of course, not necessary if you build MPICH2 using GNU Compilers)</li>
<li><span style="font-family: Courier New,Courier,mono;">make &amp;&amp; sudo make install</span></li>
<li>Next, I copied the whole <span style="font-family: Courier New,Courier,mono;">/opt/mpich2</span> directory to the slave nodes calling <span style="font-family: Courier New,Courier,mono;">scp -r /opt/mpich2 sascha@myslavenode</span> </li>
<li>The PATH and the LD_LIBRARY_PATH must contain the paths to <span style="font-family: Courier New,Courier,mono;">/opt/mpich2/bin</span> and <span style="font-family: Courier New,Courier,mono;">/opt/mpich2/lib</span></li>
<li>4. and 5. was  carried out for all nodes, i.e. all nodes had the mpich2 directory physically on their HDs and the paths were set as of 5.</li>
<li>Next, <span style="font-family: Courier New,Courier,mono;">~/<a href="http://www.tayefeh.de/wp-content/mpd.hosts" target="_blank">mpd.conf</a></span> needs to be created. This file contains a list of hosts to be connected to (for example, refer to my <a href="http://www.tayefeh.de/wp-content/mpd.hosts" target="_blank">mpd.conf</a> file)</li>
<li>On the master, I executed <span style="font-family: Courier New,Courier,mono;">mpdboot -n 2 -f ~/mpd.hosts</span> which establishes connection between 2 hosts for 6 processors (see mpd.conf)</li>
<li>I used<span style="font-family: Courier New,Courier,mono;"> mpdringtest 10000</span> and <span style="font-family: Courier New,Courier,mono;">mpdtrace -l</span> and  <span style="font-family: Courier New,Courier,mono;">mpiexec -n 6 hostname</span> respectively in order to validate the connection</li>
<li>Finally, I ran <span style="font-family: Courier New,Courier,mono;">mpdallexit</span> on one machine in order to kill the whole ring</li>
</ol>
<p>Voila! I&#8217;ve got my cluster up and running now <img src='http://www.tayefeh.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley colorbox-356' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tayefeh.de/2009/08/howto-get-mpich2-run-on-a-linux-debian-lenny-machine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating and Using a C++ Shared Library with Eclipse CDT Galileo and GNU C++ Compiler and Linker</title>
		<link>http://www.tayefeh.de/2009/07/creating-and-using-a-c-shared-library-with-eclipse-cdt-galileo-and-gnu-c-compiler-and-linker/</link>
		<comments>http://www.tayefeh.de/2009/07/creating-and-using-a-c-shared-library-with-eclipse-cdt-galileo-and-gnu-c-compiler-and-linker/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 00:49:05 +0000</pubDate>
		<dc:creator>Sascha Tayefeh</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[CDT]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tayefeh.de/?p=339</guid>
		<description><![CDATA[This walkthrough describes howto create a C++ shared library using Eclipse CDT and GNU C++ (g++) compiler and linker. ]]></description>
			<content:encoded><![CDATA[<p>This is meant to be a walkthrough rather than a tutorial, thus, this is no good for absolute C++ / Eclipse beginners (you may get lost too soon).</p>
<p>Step I: Create the Shared Library</p>
<ol>
<li>File -&gt; New -&gt; Project</li>
<li>C/C++ -&gt; C++ Project</li>
<li>Shared Library -&gt; Empty Project (remember to give it a name. Here I use <code>"testlib"</code>)</li>
<li>Create a class for Testing: File -&gt; New -&gt; Class. Name it &#8220;<code>TestClass</code>&#8220;. Also create a simple public method: prototype  <br />
 <code>void testWrite(void);</code><br />
 within <code>TestClass.h</code> and implement something like <br />
 <code>void </code><code>TestClass::</code><code>testWrite(void) { std::cout &lt;&lt; "From Shared Lib" &lt;&lt; std::endl; }</code> <br />
 within <code>TestClass.cpp</code>. Remember to include <code>iostream</code> somewhere</li>
<li>Only if you would like to create a 64bit build: Advanced Settings -&gt; GCC C++ Compiler -&gt; Miscellaneous -&gt; All Options: Add <code>-fPIC</code></li>
<li>Ctrl+B for build. There should be no errors</li>
</ol>
<p>Step II: Create some executable that uses the dynamic library</p>
<ol>
<li>File -&gt; New -&gt; Project</li>
<li>C/C++ -&gt; C++ Project</li>
<li>Executable -&gt; &#8220;Hello World C++ Project&#8221;</li>
<li>Name it &#8220;UseDLL&#8221;</li>
<li>Next -&gt; Next -&gt; &#8220;Advanced Settings&#8221;</li>
<li>GCC C++ Compiler -&gt; Directories -&gt;Add (Button to the right top)</li>
<li>Workspace -&gt; testlib (or enter: <code>${workspace_loc:/testlib}</code>)</li>
<li>Should look like this: <a href="http://img38.imageshack.us/img38/3210/001tmt.png" target="_blank"><img class="aligncenter colorbox-339" src="http://img38.imageshack.us/img38/8504/001hcf.png" alt="Eclipse CDT Library 001" width="320" height="252" /></a></li>
<li>GCC C++ Linker -&gt; Libraries</li>
<li>Add Library (-L): <code>${workspace_loc:/testlib/Debug}</code></li>
<li>Add Library search PATH (-l): <code>${workspace_loc:/testlib/Debug}</code></li>
<li>Should look like this:<br />
 <a href="http://img38.imageshack.us/img38/3429/002w.png" target="_blank"><img class="aligncenter colorbox-339" src="http://img38.imageshack.us/img38/4456/002hzl.png" alt="Eclipse CDT Library 002" width="320" height="253" /></a></li>
<li>Finally select &#8220;Paths and Symbols&#8221; from the left -&gt; References and select &#8220;testlib&#8221;:<br />
 <a href="http://img38.imageshack.us/img38/6826/003ijj.png" target="_blank"><img class="aligncenter colorbox-339" src="http://img38.imageshack.us/img38/4084/003kvl.png" alt="Eclipse CDT Library 003" width="320" height="208" /></a></li>
<li>However, this counts for &#8220;debug&#8221;. Repeat step 10 to 13 for &#8220;release&#8221; choosing &#8220;release&#8221; from the upmost tab and replacing &#8220;debug&#8221; by &#8220;release&#8221;</li>
<li>OK -&gt; Finish</li>
<li>Ctrl+B should build, however, let&#8217;s include the library and do something:</li>
<li>From the Project Explorer, DoubleClick on UseDLL -&gt; src -&gt; UseCPP.cpp and <code>include "TestClass.h"</code></li>
<li>Also add two lines within main() that create the TestClass object and call its testWrite() method:<br />
 TestClass ti;</li>
<li> ts.testWrite();</li>
</ol>
<p>Step III: Run (debug) the executable from within Eclipse</p>
<ol>
<li>First, you must set the environmental variable LD_LIBRARY_PATH: From the Project Explorer Tab, choose UseDLL -&gt; Right-Click -&gt; Debug As -&gt; Debug Configurations</li>
<li>Environment -&gt; New<br />
 Name = LD_LIBRARY_PATH<br />
 Value = <code>${workspace_loc:/testlib/Debug}</code></li>
<li>Apply -&gt; Close</li>
<li>Press &#8220;F11&#8243; key for Debug -&gt; Select &#8220;Use configuration specific setting&#8221; -&gt; &#8220;Standard Create Process Launcher&#8221; -&gt; OK</li>
<li>Now the debug view should appear</li>
<li>Set a break point (Ctrl+Shift+B) at the UseDLL.cpp line that contains &#8220;<code>ts.testWrite();</code>&#8220;:<br />
 <a href="http://img31.imageshack.us/img31/7846/004i.png" target="_blank"><img class="aligncenter colorbox-339" src="http://img31.imageshack.us/img31/2506/004g.png" alt="Eclipse CDT Library Debugging Breakpoint 004" width="320" height="238" /></a></li>
<li>Press &#8220;F8&#8243; to &#8220;Resume&#8221;</li>
<li>When the above mentioned line is reached, press &#8220;F5&#8243; to &#8220;Step Into&#8221; the method</li>
<li>Voila! You&#8217;re within the code of you dll:<br />
 <a href="http://img31.imageshack.us/img31/7015/005e.png" target="_blank"><img class="aligncenter colorbox-339" src="http://img31.imageshack.us/img31/7623/005f.png" alt="Eclipse CDT Library Debugging - Jump into a method 005" width="320" height="276" /></a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.tayefeh.de/2009/07/creating-and-using-a-c-shared-library-with-eclipse-cdt-galileo-and-gnu-c-compiler-and-linker/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PGP Global Verification Service</title>
		<link>http://www.tayefeh.de/2009/02/pgp-global-verification-service/</link>
		<comments>http://www.tayefeh.de/2009/02/pgp-global-verification-service/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 11:17:10 +0000</pubDate>
		<dc:creator>Sascha Tayefeh</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://saschatayefeh.wordpress.com/?p=73</guid>
		<description><![CDATA[PGP relies on the principle of the &#8220;Web Of Trust&#8220;. It also offers a service that allows for signing your key by PGP itself. It is called &#8220;PGP Global Directory Verification Service&#8221; and is quite easy to handle: Go to http://keyserver1.pgp.com/vkd/ and upload your key. You&#8217;ll receive an e-mail by PGP. Open this e-mail and [...]]]></description>
			<content:encoded><![CDATA[<p>PGP relies on the principle of the &#8220;<a title="Web Of Trust" onclick="window.open('http://de.wikipedia.org/wiki/Web_of_Trust','','');return false;" href="http://de.wikipedia.org/wiki/Web_of_Trust">Web Of Trust</a>&#8220;. It also offers a service that allows for signing your key by PGP itself. It is called &#8220;PGP Global Directory Verification Service&#8221; and is quite easy to handle:</p>
<ol>
<li>Go to <a title="PGP Global Directory Verification Service" onclick="window.open('http://keyserver1.pgp.com/vkd/','','');return false;" href="http://keyserver1.pgp.com/vkd/">http://keyserver1.pgp.com/vkd/</a> and upload your key.</li>
<li>You&#8217;ll receive an e-mail by PGP. Open this e-mail and click on the provided link to finalize the verification process.</li>
<li>Check the fingerprint and continue.</li>
<li>Now download the verified key and click on o.k.</li>
<li>Import the key.</li>
<li>Update the public key-servers</li>
</ol>
<p>Your done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tayefeh.de/2009/02/pgp-global-verification-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
