<?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>Haiders WebSpace &#187; Linux</title>
	<atom:link href="http://blog.creativeitp.com/category/posts-and-articles/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.creativeitp.com</link>
	<description>Let&#039;s talk about IT</description>
	<lastBuildDate>Fri, 18 Nov 2011 17:36:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>TrueCrypt: A tool to encrypt volumes on-the-fly</title>
		<link>http://blog.creativeitp.com/posts-and-articles/cryptography/truecrypt-a-windowslinux-tool-to-encrypt-volumes-on-the-fly/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/cryptography/truecrypt-a-windowslinux-tool-to-encrypt-volumes-on-the-fly/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 00:55:03 +0000</pubDate>
		<dc:creator>Haider al-Khateeb</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=578</guid>
		<description><![CDATA[TrueCrypt is a powerful yet free Open-Source disk encryption Software. I am quite satisfied with the software that I decided to introduce it here in my blog, may all future releases remain free to use! With TrueCrypt you can maintain an on-the-fly-encrypted volume (data storage device). On their website they explain &#8216;On-the-fly encryption&#8217; as an [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_579" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2011/11/TrueCrypt.jpg"><img src="http://blog.creativeitp.com/wp-content/uploads/2011/11/TrueCrypt-300x220.jpg" alt="" title="TrueCrypt" width="300" height="220" class="size-medium wp-image-579" /></a><p class="wp-caption-text">TrueCrypt</p></div>
<p><a href="http://www.truecrypt.org" title="TrueCrypt website" target="_blank">TrueCrypt</a> is a powerful yet free Open-Source disk encryption Software. I am quite satisfied with the software that I decided to introduce it here in my blog, may all future releases remain free to use!</p>
<p>With TrueCrypt you can maintain an on-the-fly-encrypted volume (data storage device). On their website they explain &#8216;On-the-fly encryption&#8217; as an automatic continuing encryption process to data right before it is saved and decrypted right after it is loaded. In simple words, you will end up having an encrypted volume to secure all your sensitive data inside. This volume can be mounted and accesses like any regular folder in your system each time you provide the right password and then dismounted to prevent access.</p>
<p>What I personally think makes this software special is the ease of using encrypted files right from the secured volume to the computer&#8217;s RAM. As such, if you have a video file, you will not wait until it is fully decrypted to play it, instead the stream will be decrypted right into the RAM while playing, the performance and speed is quite similar to playing any regular video file you have on your system. Brilliant, isn&#8217;t it?<br />
<span id="more-578"></span><br />
Similarly, files can be copied to and from a mounted TrueCrypt volume just like they are copied to/from any normal disk (drag-and-drop). Files are automatically being decrypted on the fly (in memory/RAM) while they are being read or copied from an encrypted TrueCrypt volume. </p>
<p>TrueCrypt &#8216;never saves any decrypted data to a disk – it only stores them temporarily in RAM (memory)&#8217;. In addition, it supports &#8216;hidden volumes&#8217;, which means that you may easily hide an encrypted volume inside an another encrypted volume without showing any evidence of its existence to other users of the system. This is a very important feature in case someone forces you to decrypt your sensitive data. (check TrueCrypt documentation for more information about hidden volumes).</p>
<p>To install and use in Linux, download the appropriate package from their website: <a href="http://www.truecrypt.org" title="TrueCrypt website" target="_blank">www.truecrypt.org</a>. </p>
<p>Since windows installation is wizard-based, I will leave that and cover the Linux installation procedure. First, download the Console-only version, in my case the file is called: <b>truecrypt-7.1-linux-console-x86.tar.gz</b> and was downloaded from the internet to: <strong>/home/haider/Downloads</strong>. Lets move it to the <b>/usr/local/bin</b> directory</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>haider<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>truecrypt-<span style="color: #000000;">7.1</span>-linux-console-x86.tar.gz <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin</pre></div></div>

<p>Then navigate to where it was moved and extract the file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">tar</span> xfzv truecrypt-<span style="color: #000000;">7.1</span>-linux-console-x86.tar.gz</pre></div></div>

<p>This should produce the bin file to be excuted: <strong>truecrypt-7.1-setup-console-x86</strong>. Good! lets now delete the archive file since we do not need it any more.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> truecrypt-<span style="color: #000000;">7.1</span>-linux-console-x86.tar.gz</pre></div></div>

<p>Now, change the file&#8217;s permissions to 755</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> truecrypt-<span style="color: #000000;">7.1</span>-setup-console-x86</pre></div></div>

<p>Install using the following command and accept the terms of use (select option 1 to install)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>truecrypt-<span style="color: #000000;">7.1</span>-setup-console-x86</pre></div></div>

<p>After a successful installation, you may display all the software&#8217;s arguments and options with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">truecrypt <span style="color: #660033;">-help</span></pre></div></div>

<p>Further, lets create an encrypted volume. To do that use <strong>truecrypt -c</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">truecrypt <span style="color: #660033;">-c</span></pre></div></div>

<p>Check out the following example from my Linux box:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Volume <span style="color: #7a0874; font-weight: bold;">type</span>:
 <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Normal
 <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Hidden
Select <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000;">1</span>
&nbsp;
Enter volume path: <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>my-crypt
&nbsp;
Enter volume <span style="color: #c20cb9; font-weight: bold;">size</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>sizeK<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">size</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">/</span>sizeG<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 500m
&nbsp;
Encryption algorithm:
 <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> AES
 <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Serpent
 <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Twofish
 <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> AES-Twofish
 <span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> AES-Twofish-Serpent
 <span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Serpent-AES
 <span style="color: #000000;">7</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Serpent-Twofish-AES
 <span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Twofish-Serpent
Select <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000;">1</span>
&nbsp;
Hash algorithm:
 <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> RIPEMD-<span style="color: #000000;">160</span>
 <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> SHA-<span style="color: #000000;">512</span>
 <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Whirlpool
Select <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000;">2</span>
&nbsp;
Filesystem:
 <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> None
 <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> FAT
 <span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Linux Ext2
 <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Linux Ext3
 <span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Linux Ext4
Select <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000;">5</span>
&nbsp;
Enter password: 
WARNING: Short passwords are easy to crack using brute force techniques<span style="color: #000000; font-weight: bold;">!</span>
&nbsp;
We recommend choosing a password consisting of <span style="color: #c20cb9; font-weight: bold;">more</span> than <span style="color: #000000;">20</span> characters. Are you sure you want to use a short password? <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">y</span>=Yes<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">n</span>=No<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>No<span style="color: #7a0874; font-weight: bold;">&#93;</span>: y
&nbsp;
Re-enter password: 
&nbsp;
Enter keyfile path <span style="color: #7a0874; font-weight: bold;">&#91;</span>none<span style="color: #7a0874; font-weight: bold;">&#93;</span>: 
&nbsp;
Please <span style="color: #7a0874; font-weight: bold;">type</span> at least <span style="color: #000000;">320</span> randomly chosen characters and <span style="color: #000000; font-weight: bold;">then</span> press Enter:
Characters remaining: <span style="color: #000000;">259</span>
Characters remaining: <span style="color: #000000;">190</span>
&nbsp;
&nbsp;
Done: <span style="color: #000000;">100.000</span><span style="color: #000000; font-weight: bold;">%</span>  Speed:  <span style="color: #000000;">7.0</span> MB<span style="color: #000000; font-weight: bold;">/</span>s  Left: <span style="color: #000000;">0</span> s          
&nbsp;
The TrueCrypt volume has been successfully created.</pre></div></div>

<p>From above, the volume&#8217;s path is: <strong>/root/my-crypt</strong><br />
Let mount it to a directory called <strong>encrypted-volume</strong> to start encrypting files.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>haider<span style="color: #000000; font-weight: bold;">/</span>encrypted-volume</pre></div></div>

<p>Now lets mount them.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">truecrypt <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>my-crypt <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>haider<span style="color: #000000; font-weight: bold;">/</span>encrypted-volume<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>This will open a gate to the encrypted volume, as such we must provide the correct password:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Enter password <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>my-crypt: 
Enter keyfile <span style="color: #7a0874; font-weight: bold;">&#91;</span>none<span style="color: #7a0874; font-weight: bold;">&#93;</span>: 
Protect hidden volume <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">if</span> any<span style="color: #7a0874; font-weight: bold;">&#41;</span>? <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">y</span>=Yes<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">n</span>=No<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>No<span style="color: #7a0874; font-weight: bold;">&#93;</span>: n</pre></div></div>

<p>From this point, to encrypt files just move them to the <strong>encrypted-volume</strong> directory. Once finished, demount the two to protect your files:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">truecrypt <span style="color: #660033;">-d</span></pre></div></div>

<p>In the future, if you require access to your encrypted files, or if you want to encrypt more files in that volume. Mount it again. That&#8217;s all! <img src='http://blog.creativeitp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/cryptography/truecrypt-a-windowslinux-tool-to-encrypt-volumes-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure and use OpenSSH using password-based and/or public &amp; private key pairs between two Linux boxes (Ubuntu and CentOS)</title>
		<link>http://blog.creativeitp.com/posts-and-articles/linux/configure-and-use-openssh-using-password-based-andor-public-private-key-pairs-between-two-linux-boxes-ubuntu-and-centos-and-between-a-linax-box-and-windows/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/linux/configure-and-use-openssh-using-password-based-andor-public-private-key-pairs-between-two-linux-boxes-ubuntu-and-centos-and-between-a-linax-box-and-windows/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 15:53:19 +0000</pubDate>
		<dc:creator>Haider al-Khateeb</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Remote Access]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=566</guid>
		<description><![CDATA[Unlike Telnet, Secure Shell (SSH) encrypts the connection between the remotely connected hosts and doesnt trransfer your password in plain text. As such SSH is more secure and must be used for remote connections. In this post I will install, configure and connect 2 computers running Ubuntu and CentOS. The connection will be tested with [...]]]></description>
			<content:encoded><![CDATA[<p>Unlike Telnet, Secure Shell (SSH) encrypts the connection between the remotely connected hosts and doesnt trransfer your password in plain text. As such SSH is more secure and must be used for remote connections. In this post I will install, configure and connect 2 computers running Ubuntu and CentOS. The connection will be tested with a password-based authentication followed by using public and private key pairs to establish trust between the hosts.</p>
<p>To start this trial, install OpenSSH server and client to Ubuntu using:<br />
<i>P.S. make sure you login as root when required.</i></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-client
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-server</pre></div></div>

<p><span id="more-566"></span><br />
To install them in CentOS use yum instead of apt-get:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-client
yum <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-server</pre></div></div>

<p>After installation, lets refresh the service. In Ubuntu this is done using:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> restart</pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service <span style="color: #c20cb9; font-weight: bold;">ssh</span> restart</pre></div></div>

<p>While in CentOS the service is called sshd, so we use:</p>
<p>After installation, lets refresh the service. In Ubuntu this is done using:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>sshd restart</pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service sshd restart</pre></div></div>

<p>This should enable you now to connect to each system from the other one remotely. For instance, if the IP of CentOS system is 192.168.1.5 we may access it from Ubuntu using:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> 192.168.1.5</pre></div></div>

<p>or if you want to login with a specific username such as &#8216;haider&#8217;, use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> haider<span style="color: #000000; font-weight: bold;">@</span>192.168.1.5</pre></div></div>

<p>For security reasons, you might wish to change the listening port number of the SSH service (the server, in our case is CentOS). This and other configurations are made inside the <b>/etc/ssh/sshd_config</b> file. However, before doing any changes it is a good practise to take a backup:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config.original</pre></div></div>

<p>Now edit the file using your favourite editor (vi, nano etc) and change the port from 22 to 2222 (or any other unused port). Once done restart the service again (the relevant command was mentioned above) to activate the new settings and use the following command to check the status of your new port:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-punat</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #ff0000;">&quot;2222&quot;</span></pre></div></div>

<p>To use the public key authentication, I used the following command to generate a private and a public key with RSA encryption in my Ubuntu</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span></pre></div></div>

<p>The Terminal will prompt you for a name for your keys, just press enter and the name will be id_rsa by default. These, once generated, are automatically stored in the directory you are in. As such I advice you to run it from the <strong>/root/.ssh</strong> directory to save it there. Running the command will produce two files: id_rsa (this is the private key and should remain safe in your machine) &#038; id_rsa.pub (which is the public key).</p>
<p>To allow ssh access using these keys the content of the public key must be copied to the <strong>~/.ssh/authorized_keys</strong> file on the server&#8217;s machine (CentOS). Since our ssh worked with password authentication, lets use <strong>scp</strong> (secure copy) to achieve this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa.pub 192.168.1.5:~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Now, on CentOS copy the content of the public key into the authorized_keys file (you may create this file if it doesn&#8217;t exist).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> id_rsa.pub <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> authorized_keys</pre></div></div>

<p>Then, lets allow public key authentication inside CentOS ssh configuration file. Simply make sure the following lines are not commented-out:</p>
<p><strong>PubkeyAuthentication</strong> yes<br />
<strong>AuthorizedKeysFile</strong> .ssh/authorized_keys</p>
<p>Restart ssh service again on the server (CentOS).</p>
<p>Thats all! I can now connect to my CentOS system from Ubuntu without being prompt for a password. In fact I may disable password-based authentication.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/linux/configure-and-use-openssh-using-password-based-andor-public-private-key-pairs-between-two-linux-boxes-ubuntu-and-centos-and-between-a-linax-box-and-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Share Windows Internet Connection with Linux</title>
		<link>http://blog.creativeitp.com/posts-and-articles/windows/share-windows-internet-connection-with-linux/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/windows/share-windows-internet-connection-with-linux/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:16:37 +0000</pubDate>
		<dc:creator>Haider al-Khateeb</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=301</guid>
		<description><![CDATA[This article is for you if you have internet connection in your Windows and would like to share it with a Linux box as well. To do that your windows machine should have two network cards connected, one for the internet service and the other one to connect to your other machine or to a [...]]]></description>
			<content:encoded><![CDATA[<p>This article is for you if you have internet connection in your Windows and would like to share it with a Linux box as well. To do that your windows machine should have two network cards connected, one for the internet service and the other one to connect to your other machine or to a hub/switch if you want to share it with more computers.</p>
<p><span id="more-301"></span><br />
Connect the cables. Once done, you should first enable Internet Connection Sharing on your Windows machine. To do that, right-click your Internet connection and select &#8220;<b>Properties</b>&#8220;. Then click the &#8220;<b>Advanced</b>&#8221; tab. Now simply put a tick on the following option:</p>
<p>&#8220;<i>Allow other network users to connect through this computer&#8217;s Internet connection</i>&#8221;</p>
<p>This should give your Network card the following static IP address: <b>192.168.0.1</b>. This address will represent the gateway address for the other computers in your LAN to connect to the Internet. </p>
<p>Now, move to your Linux box and use the following command to give it an IP address and a Subnet Mask:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth0 192.168.0.131 netmask 255.255.255.0</pre></div></div>

<p>The following command is then used to set the default gateway</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">route add <span style="color: #660033;">-net</span> default gw 192.168.0.1</pre></div></div>

<p>Finally, you will need to update your Linux DNS servers file. Get the two DNS servers IPs by typing<br />
&#8220;<b>Ipconfig /all</b>&#8221; In the command prompt of your Windows machine, and then add them to &#8220;<b>/etc/resolv.conf</b>&#8221; in your Linux using your favorite editor. For instance, to open the file with nano use the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>resolv.conf</pre></div></div>

<p>That’s all, try to test the connection between the two computers by pinging their IP addresses and then test your DNS configuration with any of the following commands from your Linux box:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">host google.com
&nbsp;
nslookup google.com
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ping</span> google.com</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/windows/share-windows-internet-connection-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install BackTrack in VMware Workstation</title>
		<link>http://blog.creativeitp.com/posts-and-articles/linux/install-backtrack-in-vmware-workstation/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/linux/install-backtrack-in-vmware-workstation/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 21:03:15 +0000</pubDate>
		<dc:creator>Haider al-Khateeb</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=277</guid>
		<description><![CDATA[You first need to download BackTrack’s VMWare Image for the final available release from the following link: http://www.backtrack-linux.org/downloads/ At the time of writing this post the final release is BackTrack 4 so the download gave me the following zip file: bt4-final-vm.zip Now we should do the following: First unzip the file. The result is a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.creativeitp.com/wp-content/uploads/2010/02/BackTrack4-Final-2010-02-07-03-15-30.png" target="_blank"><img src="http://blog.creativeitp.com/wp-content/uploads/2010/02/BackTrack4-Final-2010-02-07-03-15-30-300x225.png" alt="" title="BackTrack4-Final-2010-02-07" width="300" height="225" class="aligncenter size-medium wp-image-292" /></a></p>
<p>You first need to download BackTrack’s VMWare Image for the final available release from the following link:</p>
<p><a href="http://www.backtrack-linux.org/downloads/" target="_blank">http://www.backtrack-linux.org/downloads/</a></p>
<p>At the time of writing this post the final release is BackTrack 4 so the download gave me the following zip file:</p>
<p><b>bt4-final-vm.zip</b></p>
<p>Now we should do the following:</p>
<p><span id="more-277"></span></p>
<ol>
<li> First unzip the file. The result is a folder called: <b>BackTrack4-Final</b><br />
</p>
<li> Move <b>BackTrack4-Final</b> and its contents to the Virtual Machines folder created for you by VMware when you first installed it. Under Windows 7 it is located at:<br />
C:\Users\{Your User Name}\Documents\Virtual Machines<br />
</p>
<li> Run VMware Workstation<br />
</p>
<li> From the menu bar, select <b>File</b> &#8211;> <b>Open</b> and navigate to the <b>BackTrack4-Final</b> folder. Inside the folder you should find: <b>BackTrack4-Final.vmx</b>. Open it.<br />
</p>
<li> Now that the image is loaded into your VMware Desktop, click: <b>Power on this virtual machine</b>.<br />
</p>
<li> Most likely, you will get the following dialog:
<p>&#8220;This virtual machine may have been moved or copied.</p>
<p>In order to configure certain management and networking features, VMware Workstation needs to know if you moved this virtual machine or if you copied it.&#8221;</p>
<p>Choose <b>I copied it</b> and proceed.<br />
</p>
<li> If everything goes well, and it should, BackTrack will ask you to log in. The username will be <b>root</b> and the password is <b>toor</b>.<br />
</p>
<li> Once logged in as a root, type <b>startx</b> to run the graphical interface.<br />
</p>
<li> The internet/network is not connected by default in BackTrack, to start it run the Konsole and enter the <b>start-network</b> command.<br />
</p>
<li> If that did not work, open <b>Wicd manager</b> (K menu  &#8211;> Internet &#8211;> Wicd manager) and click <b>Connect</b>. The status bar should show something like:
<p><b>Connected to wired network (IP: xxx.xxx.xxx.xxx)</b></ol>
<p>If you get that, it means you connected BackTrack to the network successfully! Well done</p>
<p>At the end, make sure  you have the latest kernel sources by running the following commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> linux-source
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">tar</span> jxpf linux-source-<span style="color: #7a0874; font-weight: bold;">&#123;</span>version<span style="color: #7a0874; font-weight: bold;">&#125;</span>.tar.bz2
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> linux-source-<span style="color: #7a0874; font-weight: bold;">&#123;</span>version<span style="color: #7a0874; font-weight: bold;">&#125;</span> linux
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> linux
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">zcat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>config.gz <span style="color: #000000; font-weight: bold;">&gt;</span> .config
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> scripts
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> prepare</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/linux/install-backtrack-in-vmware-workstation/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

