<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Delusions of a chaotic mind</title>
    <link href="http://cse.iitk.ac.in/users/ppk/atom.xml" rel="self" />
    <link href="http://cse.iitk.ac.in/users/ppk" />
    <id>http://cse.iitk.ac.in/users/ppk/atom.xml</id>
    <author>
        <name>Piyush P Kurur</name>
        <email>ppk@cse.iitk.ac.in.REMOVETHISIFYOUAREAHUMAN</email>
    </author>
    <updated>2013-05-15T00:00:00Z</updated>
    <entry>
    <title>Webpage Reloaded</title>
    <link href="http://cse.iitk.ac.in/users/ppk/posts/2013-05-15-Webpage-Reloaded.html" />
    <id>http://cse.iitk.ac.in/users/ppk/posts/2013-05-15-Webpage-Reloaded.html</id>
    <published>2013-05-15T00:00:00Z</published>
    <updated>2013-05-15T00:00:00Z</updated>
    <summary type="html"><![CDATA[<div class="post">
<span class="post-date"><em>Posted on May 15, 2013 (Wednesday)</em></span>
<span class="post-tags"><em>Tag: <a href="posts/tags/Web.html">Web</a></em></span>
<h1>Webpage Reloaded</h1>
<p>This is my very first post. It also coincides with the entire rewriting of my homepage and these two events are not independent. I used to use a set of Makefiles for dependency checks, <a href="http://johnmacfarlane.net/pandoc" title="Pandoc">pandoc</a> for generating html, m4 for templating and no css. The stuff worked but it soon became difficult to maintain.</p>
<p>It was more or less clear to me from the start that I wanted a static site managed via <a href="http://darcs.net" title="Darcs">darcs</a>, written in <a href="http://daringfireball.net/projects/markdown/" title="Markdown">markdown</a>. Of course there is <a href="http://jekyllrb.com" title="Jekyll">jekyll</a> but I always thought <a href="http://johnmacfarlane.net/pandoc" title="Pandoc">pandoc</a> was way more powerful than some of the other markdown processors that comes with <a href="http://jekyllrb.com" title="Jekyll">jekyll</a>. And then I heard of <a href="http://jaspervdj.be/hakyll/" title="Hakyll">hakyll</a>. It uses <a href="http://johnmacfarlane.net/pandoc" title="Pandoc">pandoc</a> as its markdown processor which means that I get all the <a href="http://johnmacfarlane.net/pandoc" title="Pandoc">pandoc</a> goodies: easy math integration, syntax highlighting, and possibility of using different input (say latex) and output (say pdf) formats. Besides, it is written in <a href="http://www.haskell.org" title="Haskell homepage">my favorite programming language</a>. No more excuses for a bad homepage.</p>
<p>I <em>never</em> thought my page would ever be styled with css. As a language (if you can call it one) css is pretty lousy, maybe slightly better than html. Besides, no two browser seems to agree on the standard. Who, in their right senses would want to work with it ? <a href="http://compass-style.org" title="Compass">Compass</a> made me change my opinion. Firstly, you can use the <a href="http://sass-lang.com" title="Sass">sass</a> now instead of css, an advantage comparable to using <a href="http://daringfireball.net/projects/markdown/" title="Markdown">markdown</a> instead of html. Secondly, it has mixins that take care of all (most) of those browser incompatibilities. It might not go well with IE users: I don’t know, neither do I care to know. But it should work mostly. The style for this page is entirely written in sass using the <a href="http://compass-style.org" title="Compass">compass</a> framework. I will publish the source code soon after some refactoring.</p>
<p>Thanks to the great softwares mentioned above, I now have a clean homepage complete with a blog and atom/rss feeds. Some lecture notes that I had are not yet hakyllised. It will soon be.</p>
<p>A big <em>thank you</em> to the folks behind <a href="http://jaspervdj.be/hakyll/" title="Hakyll">hakyll</a>, <a href="http://johnmacfarlane.net/pandoc" title="Pandoc">pandoc</a> and <a href="http://compass-style.org" title="Compass">compass</a>.</p>
<!-- Web stuff         -->

<!-- Haskell links     -->

<!-- Co-authors         -->

<!-- Conference/Journal links -->


</div>
]]></summary>
</entry>
<entry>
    <title>Why kick Elsevier?</title>
    <link href="http://cse.iitk.ac.in/users/ppk/posts/2012-02-20-Why-Kick-Elsevier.html" />
    <id>http://cse.iitk.ac.in/users/ppk/posts/2012-02-20-Why-Kick-Elsevier.html</id>
    <published>2012-02-20T00:00:00Z</published>
    <updated>2012-02-20T00:00:00Z</updated>
    <summary type="html"><![CDATA[<div class="post">
<span class="post-date"><em>Posted on February 20, 2012 (Monday)</em></span>
<span class="post-tags"><em>Tag: <a href="posts/tags/Open Access.html">Open Access</a></em></span>
<h1>Why kick Elsevier?</h1>
<p>This is my understanding of the issue. You are free to send me any correction.</p>
<h2 id="economic-damage">Economic damage</h2>
<ol style="list-style-type: decimal">
<li><p>High cost of journal subscription. Journals of Elsevier are too costly. What is worse is that they have taken over other journals and currently have a huge monopoly.</p></li>
<li><p>Bundling journals. Libraries have to subscribe to a bundle to get a few journals of interest. Often bundles contain journals that are not of any interest to a particular institution. Worse, they include journals which themselves are questionable: e.g. journals like Chaos, Soliton and fractals.</p></li>
</ol>
<h2 id="unethical-publishing-practice">Unethical publishing practice</h2>
<ol style="list-style-type: decimal">
<li><p>Reviewing, which is important scientific responsibility of any journals, have been a sham in many cases. For example, Journals like Chaos, Soliton and fractals have published 302 papers from their Editor-in-chief El Naschie. (See <a href="http://rationalwiki.org/wiki/Mohamed_El_Naschie">http://rationalwiki.org/wiki/Mohamed_El_Naschie</a>)</p></li>
<li><p>Setting up journals on pseudo-sciences like for e.g. The Homeopathy (No link given so that they don’t get the benefit of page ranking) which give them unnecessary scientific credibility. Astrologers, What are you waiting for? Call Elsevier right now.</p></li>
<li><p>There has been cases of Elsevier publishing many fake papers written by ghost writers in return to getting paid by drug companies. See for example</p>
<ul>
<li><a href="http://classic.the-scientist.com/blog/display/55671/">The Scientist article on Merck affair</a></li>
<li><a href="http://www.cbsnews.com/8301-505123_162-42842372/elsevier-accused-again-in-ghostwriting-scandal---this-time-in-wyeth-prempropremarin-cases/">They do it again</a></li>
</ul></li>
<li><p>Reed Elsevier’s role in arms trade (See <a href="http://www.idiolect.org.uk/elsevier/">http://www.idiolect.org.uk/elsevier/</a>) While an action that is difficult to justify, I would not consider this hurting the scientific publishing directly (other than the <em>minor</em> danger of completely wiping out humanity and thus the scientific establishment, at least on earth). With pressure mounting, apparently they have given up on this illustrious business.</p></li>
</ol>
<p>Summarising, the business practice of Elsevier has hurt scientific foundation not only economically but also led to lose of scientific credibility due to the questionable publishing standards they have followed.</p>
<h1 id="what-can-we-do">What can we do ?</h1>
<ol style="list-style-type: decimal">
<li><p>Boycott them. See <a href="http://thecostofknowledge.com">http://thecostofknowledge.com</a>.</p></li>
<li><p>If you are an editor of an Elsevier journal, resign now and encourage your fellow editors to resign en masse. See</p>
<ul>
<li><a href="http://www.cs.colorado.edu/~hal/jalg.html"><em>Journal of Algorithms</em> editorial board resignation</a></li>
<li><a href="http://math.ucr.edu/home/baez/topology-letter.pdf">Resignation of the editorial board of <em>Topology</em></a></li>
</ul></li>
<li><p>If you happen to be in the library committee of your institute try to get Elsevier out of the subscription list.</p></li>
<li><p>Support and form journals like <a href="http://theoryofcomputing.org"><em>Theory of Computing</em></a></p></li>
<li><p>Make all your work available on the net.</p></li>
</ol>
<p>Remember all of this is not without ``risks’’. So evaluate the best options for you and make up your mind.</p>

</div>
]]></summary>
</entry>
<entry>
    <title>SSHFS: Remote directory over ssh</title>
    <link href="http://cse.iitk.ac.in/users/ppk/posts/2011-06-03-SSHFS-Remote-directory-over-ssh.html" />
    <id>http://cse.iitk.ac.in/users/ppk/posts/2011-06-03-SSHFS-Remote-directory-over-ssh.html</id>
    <published>2011-06-03T00:00:00Z</published>
    <updated>2011-06-03T00:00:00Z</updated>
    <summary type="html"><![CDATA[<div class="post">
<span class="post-date"><em>Posted on June  3, 2011 (Friday)</em></span>
<span class="post-tags"><em>Tag: <a href="posts/tags/Security.html">Security</a></em></span>
<h1>SSHFS: Remote directory over ssh</h1>
<p>Often one wants shared access to files across machines. Traditionally one uses the <a href="http://en.wikipedia.org/wiki/Network_File_System_(protocol)" title="NFS Wiki">network file system</a> (<a href="http://en.wikipedia.org/wiki/Network_File_System_(protocol)" title="NFS Wiki">nfs</a>). The network file server works as follows: There is an <em>nfs server</em> that <em>exports</em> some directories in its filesystem hiearchy to various <em>nfs clients</em> that <em>mount</em> these directory over the network into their file system hierarchy. As a result, each of the clients shares the directories exported by the nfs server. However <a href="http://en.wikipedia.org/wiki/Network_File_System_(protocol)" title="NFS Wiki">nfs</a> is probably the worst protocol when it comes to security and is rightly called network failure system.</p>
<p>This is a tutorial on sshfs or ssh file system. The idea is to provide a <a href="http://en.wikipedia.org/wiki/Network_File_System_(protocol)" title="NFS Wiki">nfs</a> like mount which is secured by the very dependable ssh (the sftp subsystem of ssh).</p>
<h1 id="using-sshfs.">Using sshfs.</h1>
<ol style="list-style-type: decimal">
<li>First mount the remote directory onto a local directory</li>
</ol>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ sshfs ppk@remote: path/to/mount</code></pre></td></tr></table>
<p>where <code>path/to/mount</code> is the point where you want the remote file system to be mounted.</p>
<ol start="2" style="list-style-type: decimal">
<li>After step 1, <code>path/to/mount</code> on your local machine is actually the home directory of the remote machine. So you can use it just like a local machine. Expect slow response if your network connection to remote machine is slow though.</li>
</ol>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">$ <span class="kw">cd</span> path/to/mount
$ emacs myfavoritprogram.hs
$ ghc myfavoritprogram.hs</code></pre></td></tr></table>
<ol start="3" style="list-style-type: decimal">
<li>After you are done with the work on the remote machine you may unmount the file system</li>
</ol>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ fusermount -u path/to/mount</code></pre></td></tr></table>
<h1 id="how-it-works.">How it works.</h1>
<p>Sshfs is a userspace file system (fuse) that works over ssh, or rather sftp. Fuse is an implementation of filesystem primitives in userspace rather than in kernel space. This essentially means that users can mount and unmount file system without having to be root. Sshfs makes use of the sftp subsystem to do the remote file system operations. Thus all the great features of ssh holds true, i.e. key based authentication, use of ssh-agents. See my <a href="ssh.html">tutorial on ssh</a> for more details on how to use ssh.</p>
<h1 id="installing-sshfs.">Installing sshfs.</h1>
<p>All linux distros have a prebuilt package for sshfs. On <a href="http://www.debian.org" title="The Debian homepage">Debian</a>/<a href="http://www.ubuntu.com" title="The Ubuntu homepage">Ubuntu</a> and <a href="http://www.archlinux.org" title="The Arch Linux homepage">Arch</a> the relevant package is <code>sshfs</code>. So all you need to do is to install it.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ aptitude <span class="kw">install</span> sshfs <span class="co"># as root.</span>
$ <span class="kw">sudo</span> aptitude <span class="kw">install</span> sshfs <span class="co"># if you are on Unbutu</span>
$ pacman -S sshfs <span class="co"># as root on an Arch machine</span></code></pre></td></tr></table>
<p>On Fedora it looks like it is called <code>fuse-sshfs</code> so something like this should work.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">$ yum <span class="kw">install</span> fuse-sshfs</code></pre></td></tr></table>
<h1 id="ssh-is-working-but-not-sshfs.">Ssh is working but not sshfs.</h1>
<p>A common error that people have reported is that ssh works but sshfs fails. If this happens, check whether your sftp subsystem is working. Most probably this too would fail or work incorrectly. One of the main reasons why sshfs/sftp does not work is because your startup scripts in the remote machine prints stuff on the screen. To check this out, try the following command.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">$ <span class="kw">ssh</span> ppk@remote /bin/true</code></pre></td></tr></table>
<p>If this command produces any output then you are in trouble. You have to fix your startup script in your remote machine — <code>.bash_profile</code> and <code>.bashrc</code>, if you are using bash as your default shell. The startup script should check whether the standard output is a terminal before it outputs something. For this protect your output generating commands inside a <code>test -t 1</code> block as follows</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">$ <span class="kw">cat</span> .bash_profile

<span class="kw">if [</span> <span class="ot">-t</span> 1<span class="kw"> ]</span> <span class="co"># Check if stdout is connected to a terminal</span>
<span class="kw">then</span>
    <span class="kw">echo</span> <span class="st">&quot;The answer is 42&quot;</span>
<span class="kw">fi</span></code></pre></td></tr></table>
<p>See the <a href="http://www.openssh.com/faq.html" title="ssh faq">openssh FAQ</a> for more details.</p>

</div>
]]></summary>
</entry>
<entry>
    <title>SSH: A quick guide</title>
    <link href="http://cse.iitk.ac.in/users/ppk/posts/2011-06-02-SSH-A-quick-guide.html" />
    <id>http://cse.iitk.ac.in/users/ppk/posts/2011-06-02-SSH-A-quick-guide.html</id>
    <published>2011-06-02T00:00:00Z</published>
    <updated>2011-06-02T00:00:00Z</updated>
    <summary type="html"><![CDATA[<div class="post">
<span class="post-date"><em>Posted on June  2, 2011 (Thursday)</em></span>
<span class="post-tags"><em>Tag: <a href="posts/tags/Security.html">Security</a></em></span>
<h1>SSH: A quick guide</h1>
<p>The secure shell or <em>ssh</em> is much more than a secure replacement for telnet. Using ssh is not only secure but also convenient. We will have a look at ssh in this article. The objective is not to explain all the features of ssh, for that you can consult the man page, but to examine some of the key features and their use. All the code in this poset should work if you cut and paste (without the <code>$</code> prompt of course) it on to the terminal. Also by ssh I mean <a href="http://www.openssh.com" title="OpenSSH homepage">openssh</a> throughout.</p>
<h2 id="your-.ssh-directory">Your .ssh directory</h2>
<p>All the files used by ssh are inside the .ssh directory in your home area. Here is a list of them and their use.</p>
<ul>
<li>known_hosts: This file contains the public keys of some of the hosts that you have logged in to.</li>
<li>id_rsa: <a href="http://en.wikipedia.org/wiki/RSA" title="RSA Wiki">RSA</a> private key.</li>
<li>id_rsa.pub: <a href="http://en.wikipedia.org/wiki/RSA" title="RSA Wiki">RSA</a> public key.</li>
<li>id_dsa: <a href="http://en.wikipedia.org/wiki/Digital_Signature_Algorithm" title="DSA Wiki">DSA</a> private key.</li>
<li>id_dsa.pub: <a href="http://en.wikipedia.org/wiki/Digital_Signature_Algorithm" title="DSA Wiki">DSA</a> public keys.</li>
<li>authorized_keys: List of public keys of users who are authorised to access this account.</li>
</ul>
<h2 id="managing-known_hosts">Managing known_hosts</h2>
<p>The known_hosts file contains the public keys of all the hosts that you have logged in to. It is a good idea to get these known hosts from a trusted source. When your ssh client contacts a server, it receives public key of the server. If there is a mismatch, ssh warns you that the key has changed. This could be due to a man-in-the-middle attack or due to a system reinstallation. When you get such a message it is better to be sure that there is no tampering. Be especially careful if you in an unknown LAN or WiFi network like that of an airport or a hotel. Having a trusted known_hosts file is a very good security measure.</p>
<h2 id="key-based-login.">Key based login.</h2>
<p>Usually one uses ssh with passwords to login. Although this is secure in the sense that the passwords sent are encrypted, it has all the problems of password based authentication. An alternative is to use public key/private key based authentication. The public key access is more secure and in fact more convenient than the password based access. Here is the step by step procedure.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ <span class="kw">ssh-keygen</span> <span class="co"># Generate the public key/private key pair.</span></code></pre></td></tr></table>
<p>You will find the generated keys inside the .ssh directory. The files with extension .pub are the public keys. Copy them into the .ssh/authorized_keys file of the remote machine.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">$ <span class="kw">scp</span> .ssh/id_rsa.pub @remote:
$ <span class="kw">ssh</span> remote
ppk@remote: <span class="kw">mkdir</span> .ssh
ppk@remote: <span class="kw">cat</span> id_rsa.pub <span class="kw">&gt;&gt;</span> .ssh/authorized_keys
               <span class="co"># copy the key to the authorized_keys file.</span>
ppk@remote: <span class="kw">chmod</span> 644 .ssh/authorized_keys
               <span class="co"># Ensure that it is readable only to user.</span></code></pre></td></tr></table>
<p>The last step is particularly important. Ssh will refuse to login if it finds that the .ssh/authorized_keys is writeable to someone other than the user. Otherwise an intruder could leave his public key and will have unrestricted access. So do not forget to change permissions. Many have been stumped by this and ssh does not give any indication on where the problem is.</p>
<p>In case you connect to many hosts it is a good idea to install the same public key in all the different hosts you log into. Thus you need to remember only one passphrase for all these hosts.</p>
<h2 id="generating-keys-from-a-windows-machine">Generating keys from a Windows machine</h2>
<p>Of course the best option is to install yourself an operating system, one of the BSD’s or GNU/Linuxes for example. However if you don’t have that option, you will also be forced to use other ssh clients like putty. My experience with these clients are limited and that prevents me from giving a detailed procedure. Usually they have a click-click interface to generate keys. The keys generated are however not in the format expected by by openssh. Don’t you worry. The correct format is only a command line away.</p>
<p>As before you have to copy the public key to the remote machine. The command</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ <span class="kw">ssh-keygen</span> -i -f pubkeyfile</code></pre></td></tr></table>
<p>will convert an SSH2 compatible key format, which is what many of the commercial ssh-client uses, to openssh compatible key format and print it on the standard output. So after copying the public key to the remote machine, you can type</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ <span class="kw">ssh-keygen</span> -i -f pubkeyfile <span class="kw">&gt;&gt;</span> .ssh/authorized_keys</code></pre></td></tr></table>
<p>on the remote machine.</p>
<h2 id="passphrase-empty-passphrase-and-ssh-agents.">Passphrase, Empty Passphrase and SSH-agents.</h2>
<p>While generating a public key/private key pair one is asked for a passphrase. The passphrase is used to keep you private key encrypted on the disk. It is never sent across the network or used in the protocol. Thus one can use an empty passphrase in which case the private key is kept unencrypted on the disk. In case your machine is a private laptop this is not such a bad idea. The advantage of an empty passphrase is that you will never have to type any passwords while ssh-ing or scp-ing. However there is always a risk of your private key getting compromised if the local machine from which you log on to the remote machine is a shared machine. You could, for example, forget to logout from the common terminal. So it is a good idea to have a passphrase.</p>
<p>A better alternative to an empty passphrase is to use an ssh-agent. The ssh-agent keeps you private key with it and does all authentication on your behalf. Here is a quick example.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ <span class="kw">ssh-agent</span> <span class="kw">bash</span>  <span class="co"># start a new shell session with an ssh-agent running</span>
$ <span class="kw">ssh-add</span>         <span class="co"># add your public keys to the agent.</span>
$ <span class="kw">ssh</span> remote      <span class="co"># No passphrase will be asked</span>
ppk@remote: <span class="kw">exit</span>
$ <span class="kw">scp</span> foo ppk@remote:  <span class="co"># No passphrase will be asked.</span></code></pre></td></tr></table>
<p>I like to use ssh-agent in conjunction with screen (another cute program). This is what I do.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ <span class="kw">ssh-agent</span> screen <span class="co"># start a screen session with an ssh-agent</span>
$ <span class="kw">ssh-add</span>          <span class="co"># in any of the windows of the screen.</span></code></pre></td></tr></table>
<p>Now no passwords are asked in any of the windows of the screen session. Usually I leave my screen session running in the office machine (which is physically secure as only I have the key to my office) and when I connect from home, I attach my self to the already running screen in my office machine.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
ppk@home: <span class="kw">ssh</span> office
ppk@office: screen -x  <span class="co"># connect to the already running screen</span></code></pre></td></tr></table>
<p>When I am done I detach the screen. Thus one can go on for months without typing any passphrase for any of the ssh/scp/sftp sessions.</p>
<h2 id="ssh-tunneling-or-port-forwarding.">SSH-tunneling or port forwarding.</h2>
<p>One of the most powerful uses of ssh is its ability to <em>port forward</em>. You can build an <em>ssh tunnel</em> and connect a local port to a remote port. For all purpose this local port is the remote port. For example suppose there is an smtp server (mail server) running on remote which relays mails only from remote. You can set up a tunnel that connects your local port with that of the remote smtp port provided you have shell access to the remote host. Here is how you do it.</p>
<table class="sourceCode bash numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
</pre></td><td class="sourceCode"><pre><code class="sourceCode bash">
$ <span class="kw">ssh</span> -N -L 2500:remote:25 ppk@remote <span class="kw">&amp;</span></code></pre></td></tr></table>
<p>Now you have a smtp server “running” at port 2500 of your machine. All the traffic to port 2500 is redirected via the ssh tunnel to the port 25 of the remote machine. If you want to actually forward the port 25 of you local machine, you need to be root on your local machine as this is a privileged port. However you don’t need root access on remote.</p>
<p>Using tunnel devices and ssh port forwarding one can also setup vpn like network. We wont go into the details in this article.</p>

</div>
]]></summary>
</entry>
<entry>
    <title>Markdown: or how I stopped hating html and started liking homepage creation</title>
    <link href="http://cse.iitk.ac.in/users/ppk/posts/2010-04-13-Markdown.html" />
    <id>http://cse.iitk.ac.in/users/ppk/posts/2010-04-13-Markdown.html</id>
    <published>2010-04-13T00:00:00Z</published>
    <updated>2010-04-13T00:00:00Z</updated>
    <summary type="html"><![CDATA[<div class="post">
<span class="post-date"><em>Posted on April 13, 2010 (Tuesday)</em></span>
<span class="post-tags"><em>Tag: <a href="posts/tags/Web.html">Web</a></em></span>
<h1>Markdown: or how I stopped hating html and started liking homepage creation</h1>
<p>It was hate at first sight. I remember quite well my first encounter with <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a>. It was way back in the previous century (somewhere around 1997-98) when I first saw an actual <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> page. It looked uglier than the <em>DO 10 CONTINUE</em> lines of Fortran 77 that we were forced to use as part of our B.Tech “Learn how to use a computer” course. Many of my friends considered this Fortran course as part of the “Ragging” that one has to endure to become Engineers. But I am sure when they started their webpage creating phase of life they would have come for an even bigger shock. To put it politely: <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> is an ugly format that has caused more miseries to humanity than all the world’s religions put together.</p>
<p>The popularity of <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> is baffling. It is not the most efficient of the formats from the rendering point of view and definitely not a format for mere mortals. The kludge called <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> also brought about an industry of WYSIWYG <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> editors which really spits venom when asked to render a Hello world page. This has lead to many “Best view by …. under 1024 x 798 resolution” pages; so much for the “portability” of <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a>. Despite all these shortcomings <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> became popular. What more its “success” as a text format lead people to the creation of even uglier cousins like <a href="http://www.w3.org/XML/" title="XML Homepage">XML</a>.</p>
<p>In this difficult world I had to make my homepage. Having a homepage is important in today’s world, they say. It is important to have your papers online, for example, in the unlikely event that some one is interested in your work. But the ugliness of <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> was unbearable. I searched far and low for other ways to create <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> including <a href="http://www.latex2html.org" title="LaTeX to HTML homepage">LaTeX2HTML</a>. All had their drawbacks.</p>
<p>Enter <a href="http://daringfireball.net/projects/markdown/" title="Markdown homepage">Markdown</a>. This really changed my life as far as webpage creation is concerned. Here is a format that one can easily convert to <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a> and is as pleasing to write as an anonymous hate mail to your boss (<a href="http://daringfireball.net/projects/markdown/" title="Markdown homepage">markdown</a>’s format is based on email conventions). To convert markdown to html one just uses the <a href="http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip" title="Markdown.pl">markdown.pl</a> script. However my favourite converter is the swiss army knife for format conversion <a href="http://johnmacfarlane.net/pandoc/" title="Pandoc Homepage">pandoc</a>. <a href="http://johnmacfarlane.net/pandoc/" title="Pandoc Homepage">Pandoc</a> is a program that can inter convert between various text formats much like the <a href="http://www.imagemagick.org/script/convert.php" title="ImageMagick convert">convert</a> for image formats. This means that if you already have an existing homepage you can use <a href="http://johnmacfarlane.net/pandoc/" title="Pandoc Homepage">pandoc</a> to first convert it into <a href="http://daringfireball.net/projects/markdown/" title="Markdown homepage">markdown</a>, edit it and then reconvert to <a href="http://www.w3.org/TR/REC-html40/" title="HTML Reference">html</a>. Pandoc also supports much needed extensions like the inline math a la LaTeX, a horror if one has to do it using <a href="http://www.w3.org/Math/" title="MathML">MathML</a>.</p>
<p><a href="http://johnmacfarlane.net/pandoc/" title="Pandoc Homepage">Pandoc</a> is not just a text format converter. It comes with a supporting <a href="http://www.haskell.org" title="Haskell Home">Haskell</a> library which can be used to program specialised converters if needed.</p>

</div>
]]></summary>
</entry>

</feed>
