Archive for February, 2009

Generate PDF from C#.NET

Generating PDF files from .NET has always been a cumbersome task. There are a couple of different ways by which a PDF can be created from Microsoft.NET.

  1. Crystal Reports.NET that comes with the Visual Studio.NET
  2. Free Utilities like NFop and Open source systems Report.NET, PDFSharp etc.
  3. Commercial software such as ABC Pdf, Aspose Pdf, etc

NFOP has always been my favorite to generate PDF documents. I have used this in enterprise level web applications to generate hundreds of PDF documents successfully. NFOP was originally developed by Jason Pettys. It is an extension of the open source project Apache FOP. NFOP (Formatting Objects Processor) accepts XSL-FO (XSL-Formatting object) as input and renders the result in PDF as output.

Even though the original article on NFOP by Laurent Kempfe gets you started, in the initial days I found this not adequate as it fails to provide a comprehensive view of how the FOP, .NET, XML, and XSL-FO go together in creating a PDF. This blog aims to bridge that gap.

Follow these six steps to successfully generate a PDF on the fly.

  1. Download NFop.
  2. Download Microsoft J#.NET redistributable package for .NET 1.1 or for .NET 2.0
  3. Create an ASP.NET project and add ApacheFop.Net and vjslib as a reference to the project.
  4. Data in XML format: Usually when generating a PDF document you will be dealing with dynamic content rather than static content. The first step is to get all the data that you want in a properly formatted XML document.
    <?xml version=”1.0″ encoding=”utf-8″?>
    <product>
    <name>Tonido</name>
    <developedby>Codelathe</developedby>
    <website>http://www.tonido.com</website>
    </product>
  5. Create XSLT: Google XSL-FO and you will find lot of articles on the subject. However, you have to remember that not all the language elements in XSL-FO are supported by NFOP and there are no reliable documents that I have come across that provide this information. When generating complex PDF docs you may end up following trial and error method to find the XSL-FO elements accepted by NFOP. However, for most practical purposes you should not have any problem.
  6. Render PDF: Use the C# Code, XML (as part of C# code) and XSLT-File to generate the PDF. That’s all to it.

Are you working for a startup and don’t know when to quit?

jobIf the following relates to you, read further.

  1. You are working for a start-up
  2. You are receiving a salary less than your market value
  3. You have worked for a reasonable number of years and in a dilemma of when to call it quits
  4. You have developed a strong bond with the management and don’t want to disappoint them by quitting.

I understand you have invested some years at your current company and have developed an attachment to the company’s success. But, this is the time for you to make a decision that is right for you and your family. Let me aid you in making the call.

If it has been more than 5 years and the company has not become profitable, quit. Take your losses. Invest your experience and time in another company. Even better, start your own company.

If the company is profitable, but still hasn’t made to the level to be bought out, then go through the following check list.

  1. Estimate your market value. Check out www.salary.com. Do not overestimate. Also, check the job market condition.
  2. Estimate the value of your options. Underestimation is good. Don’t let your emotions judge the value, checkout a competitor that got bought out recently. Make a realistic judgment.
  3. Calculate your income per year using the below formula:

Income = Current Salary + Options Value

If your income is greater than your market value, stay and re-evaluate in a year. Otherwise, talk to the management to increase your salary or options. If you can get an options or salary increase to make your income greater than your market value, stay. If not, quit.

Good luck with your career.

Impractical not to rely on servers? Nah!

I was recently reading Dreaming in Code by Scott Rosenberg, which describes the Chandler project; which started out as a PIM and an Microsoft Outlook alternative that could share information between users directly via peer-to-peer without intermediary servers (and Exchange Servers).

Here’s a quote from the book about OSAF rethinking their original plans for Chandler to support peer-to-peer synchronization

“Maybe there was a reason nobody had ever built software that seamlessly shared information across multiple computing platforms without relying on servers. Maybe it just wasn’t practical.”

Maybe. But Tonido does just that. Tonido Workspace and Photos share information without using any third party servers. Tonido only uses Domain (Directory) servers to locate other Tonido instances.

cay7mxyp

Then, there is a section where Kapor (who was behind Chandler) has a change of heart about using peer-to-peer.

“There was a kind of frontier idealism that was well intentioned but not practical on my part. The issue is about empowering people. It’s not about the infrastructure. … My and OSAF’s original position was, electricity is good, therefore everyone should have their own power plant! Unconsciously, I always imagined that user empowerment somehow meant a server-free or server-light environment. Now  I think that’s actually wrong.”

He later says

“This actually turns out to be a deeply charged issue. So many of the people who are thought leaders in open source value freedom and initiative, and those values have been very tied up with this American frontier myth of self-sufficiency ..”

It was a turning point for Chandler because it went from being an symbol of independence to another me-too product in the crowded market and that later became almost irrelevant by the advent of Web Apps.

It is an interesting book in several ways and particularly interesting to me because of some of the parallels between Tonido and Chandler. Tonido has idealistic notions of privacy, freedom and self-sufficiency. And usually, when software is implemented based on some ideals, the first thing that goes out of the window when there are technical problems are ideals. I would be lying if I were to say no such decision happened in Tonido, but at the end of Tonido’s development, I am proud to say that none of the core ideals were sacrificed on the altar of practicality.

Tonido is an alternative to web applications that come today and disappear tomorrow. For us it is a viable alternative. But only you will have to tell us if it is the same for you.

In one way, I am glad I read the book after Tonido reached alpha. It would have been too demotivating otherwise to have read it before. It would have told us that a project of Tonido’s scope and vision was impossible.

I guess we were too busy writing Tonido’s code. As they say, never let anyone tell you that something is impossible.

Tonido Workspace – Personal Information Manager(PIM) and P2P Group Collaboration

In our continuing roundup of Tonido applications, we covered Tonido Jukebox, Tonido Webshare and Tonido Photos. The fourth application that is part of the initial Tonido Beta is Tonido Workspace, which we will cover in more detail in this post.

Tonido stands for freedom to share information without losing privacy and Tonido Workspace continues that theme.

1) At its simplest Tonido Workspace is a Personal Information Manager (PIM). As any information manager, Workspace allows you to add and manage information items such as tasks, notes, contacts, files and calendar in your Personal Workspace. And since this is part of the Tonido platform, you can work on Tonido Workspace remotely from anywhere.

2) Tonido Workspace doesn’t stop there, it has a powerful data synchronization system, that allows a set of people who are part of a Tonido group to collaboratively work together, and more importantly, almost magically without having a central server. Everyone runs a copy of Tonido Workspace in their machines and workspace data is synchronized among all the members of the group. Imagine Microsoft Outlook without Exchange server. Imagine if your Outlook directly talked to other Outlook clients and somehow synchronized information. That is Tonido Group Workspace. Yes, this is “Look Ma, No Servers!”.

tonido_ws_concept

Tonido Workspace as a Personal Information Manager (that runs in your web browser)

Tonido Workspace functions first of all as a full fledged personal information manager with all the functions that PIMs have. You can store and organize your life using Tonido Workspace. Including adding Tasks, Contacts, Calendars, Files and Notes. And the best part is that everything is available via your web browser whether you are sitting on your computer or half-way across the globe.

Here are some of the PIM features:

Dashboard

Your Workspace Dashboard, gives you a bird’s-eye view to track stuff happening in your life. It includes upcoming events from your calendar for the next 2 weeks, your tasks and a timeline of recent changes.

tonido_workspace

Tasks

Add tasks, to which you can add due dates, priorities, assignees etc. You can then sort your task lists, filter it by various categories, print it etc.

Calendar

Workspace has full fledged calendar support that allows setting up recurring calendar events and appointments.

workspace_addevent

Notes

Notes allows rich text formatting and longer documents to be added. Notes also supports versioning. So you can edit Notes and always keep previous versions around as well.

Contacts

Contacts allows any sort of flexible data to be stored about as contact information. There are no limits on number of addresses or pre-set types. You can add any number of phones, emails, addresses and even add any number of custom fields. Import from vcard format is supported (single and multiple contacts).

workspace_contacts1

Files

Workspace allows you attach any files to your workspace. The file is copied into the workspace and can be downloaded later from anywhere.

workspace_files

Tonido Workspace for Seamless Group Collaboration

The features above are interesting, but what sets Workspace apart is the ability to collaborate with any arbitrary group of people by simply creating a Tonido group and enabling Workspace for that group. When each Tonido group member enables their workspace, the data in that group workspace starts to be synchronized among the members of that group directly.

For example, say you had a Tonido group with Tom, Jane and Joe as members. When Tom adds a task to his group workspace using his copy of Tonido, it will be synchronized to Jane’s and Joe’s group workspace as well. And the same thing will happen if Jane or Joe add a task or any other item. It will appear in all other workspaces automagically. Synchronization not only happens for adding, but for modifying and deleting as well. Everything gets synchronized. And it doesn’t even matter if your Tonido Workspace is offline. The next time you come online, information in your workspace gets synchronized. In fact, there is actually no difference between being online or offline, your Workspace functions identically. Perfect for the long plane trip, when you can do everything with Workspace without being connected.

Behind the scenes, Tonido Platform’s Data Synchronization framework does the heavy lifting, allowing essentially peer-to-peer data synchronization. This is one of the powerful features provided by the Tonido Platform which we will talk about in a future blog post.

And, what happens in the case of conflicts? i.e. two people edit the same information for instance.

Tonido workspace data synchronization is implemented with conflict resolution in mind. By default, Workspace can resolve conflicts by using the most recent change first, but it can use a whole host of conflict resolution methods. Not only is conflict resolution a workspace level setting, it can even be an item specific setting. For instance, you may want conflicts for a specific item to be resolved in a particular way and the rest of the workspace using another way.

workspace_conflictresolution

A Tonido group workspace offers more than a personal workspace. In addition to the features of the PIM (shared tasks, shared contacts, shared calendar, shared notes, shared files)

Discussion Forums

You can post topics and have discussions on those topics.

workspace_forum1

Chat

Chat is built-in. All chat for that group workspace is archived and synchronized. So you never miss a thing.

workspace_chatleft

Timeline

Tonido workspace provides a timeline of all events occurring in the workspace. What happened when and who did what.

workspace_timeline1

Hierarchical Information Management

One of the most powerful features in Tonido Workspace is the ability to organize information hierarchically. Any information item in Workspace can contain other item types as children. For example, you could attach any number of files to a task item. You don’t have to stop with files. You can add comments and additional notes to a task as well. And while you are at it, you can throw in a calendar event that will now automatically appear in the calendar. Eureka! Your task now appears in your calendar as well. The flexibility and possibilities are endless.

workspace_hierarchy1

Want to track customer phone calls? No problem, simply add the customer as a contact in Workspace, and log phone call notes as child items to that contact. A simple CRM at your finger tips.

Want to discuss the latest design document or functional spec? Simply attach the document to Tonido workspace and let everyone comment on that file. It is now simple to get everyone involved easily, without getting overwhelmed especially if you work with a large set of documents.

Linking Support

Tonido Workspace supports the concept of links. You can link arbitrary items together. So you can always navigate from one item to another item by following the links.

workspace_links

Tagging Support

Tonido Workspace allows arbitrary categorization of your items by using Tags. Once you tag items, you can filter items using a specific tag; so you can work on them specifically.

workspace_tags1

Unlimited File Sizes

Tonido Group Workspace allows files to be attached to the workspace which will get synchronized to other Tonido members. But there are no size limits to the files you can attach. The files will be transmitted directly to other Workspace members.

Full Text Search

Finding stuff in Workspace is easy with full text search built right in. Type any fragment and all items of any type that match are displayed.

workspace_search3

Tonido Workspace is a great fit for people who like to use PIMs but want the availability of online apps. It is also a great fit for distributed teams, small businesses, student project teams and families. Tonido workspace follows through the dream of a truly distributed and private collaboration system.

Like Tonido Workspace? Get Tonido.


Install Apache-PHP-MySQL-Drupal on Ubuntu 8.0.4(Hardy)

I recently installed Drupal on my Ubuntu 8.0.4 desktop. Below are my step-by-step instructions.

1. Install Apache HTTP Server

sudo apt-get install apache2

2. Install MySQL Database Server
sudo apt-get install mysql-server-5.0

3. Install PHP5 and Apache PHP5 module
sudo apt-get install php5 libapache2-mod-php5

4. Install phpMyAdmin (Optional)
sudo apt-get install phpmyadmin

5. Install MySQL Administrator (Optional)
sudo apt-get install mysql-admin

6. Open php.ini
gksudo gedit /etc/php5/apache2/php.ini

7. Add the following line in the php.ini
extension=mysql.so

8. Open apache2.conf
gksudo gedit /etc/apache2/apache2.conf

9.Add the following line of code inside apache2.conf to setup phpmyadmin under Apache
Include /etc/phpmyadmin/apache.conf

10. Now restart Apache
sudo /etc/init.d/apache2 restart

11. Go To http://localhost/phpmyadmin
Login using your MySQL user name and password that you have set when installing MySQL server.Create a database for drupal.  In my case I created a database named “drupaldb”.

12. Install GD module for php5
sudo apt-get install php5-gd

13. Download the latest stable Drupal from here.
In my case I am using drupal-6.9.  Change to your default download directory.

14. Extract the drupal-6.9.tar.gz to your default web directory.

sudo tar -xvf drupal-6.9.tar.gz  -C /var/www/

15. Change to drupal sites default directory
cd  /var/www/drupal-6.9/sites/default

16. Make a copy of default.settings.php file as settings.php
sudo cp default.settings.php settings.php

17. Make the settings.php as writable
sudo chmod a+w settings.php

18. Make the sites/default directory as writable
sudo chmod a+w /var/www/drupal-6.9/sites/default

19. Now restart Apache
sudo /etc/init.d/apache2 restart.

20. Go to http://127.0.0.1/drupal-6.9/ . You will see drupal install page.

Install Page.

Install Page.

21. Enter database information. Save and Continue.

Enter database info.

Enter database info.

Install Progess

Install Progess

22.  Enter site name and admin email address.

Enter site name and admin email address.

Enter site name and admin email address.

23. Enter site admin name and password.

Enter admin user name and password.

Enter admin user name and password.

24. Drupal install is complete. Click your new site to go to new site.

Install Complete

Install Complete

Note: After installing Drupal, remove the write permissions from settings.php file to avoid security risks.

sudo chmod a-w /var/www/drupal-6.9/sites/default/settings.php

Tonido Photos – Private Photo Sharing Desktop-to-Desktop

In our continuing roundup of Tonido applications, we covered Tonido Jukebox and Tonido Webshare. The third application that is part of the initial Tonido Beta is Tonido Photos, which we will cover in more detail in this post.

One of the most common things people do using the internet is share pictures with each other.  For example, Facebook alone hosts more than 10 billion photos, with Photobucket around 6 billion and Flickr weighing in about 2 billion (a year ago). That is a lot of photos, considering the fact that worlds population stands at 6.7 billion. That is about 3 photos for each person in the world! And we only considered 3 photo sharing web sites. There are countless more.

There are two primary reasons photos are shared. One, as a way to show off your photographic skills, tell a story(journalism, photo blog) or to show something interesting to the world. The second one is to share your life events with a closed group of friends and family. Sites like Photo.net, Flickr, photoblogs etc aim to satisfy the first scenario while, Google’s Picasaweb, Facebook and other more traditional sites target the second scenario. In both cases, the ability to comment, tag, rate adds another dimension of interaction.

Irrespective of the reason, photo sharing is done by uploading photos to a photo hosting site and in the case of the second scenario notifying friends and family by sending a link to the photo site.

This works reasonably well but with several caveats:

1. Photos are never private. They go to a third party site. Do you know who else is looking at it? Do you know what happens to them after you remove them?

2. Photo uploading is still a painful ordeal. Trying to take a full sized jpeg from your run-of-the-mill digital camera which is about  2 MB in size and then uploading them is not fun. If you want to resize them before uploading, it is even less fun. This is going to get worser as digital cameras are still running the megapixel race, taking pictures at high resolution is pretty much useless unless you are going to print, because it becomes impractical to share large pictures easily without spending lots of time babysitting uploads.

3. A subset of people who do view the photos want a copy of the photos in their hard disk for later viewing. There are several reasons for such a requirement. Some don’t have 24×7 internet connection, so they would like to view the photos even when offline. And some want to add the photos to their photo collections.

4. Every comment/rating/tag on a photograph is in public domain in one form or another and stays in circulation long after the photograph is removed by the user.

5. Photos can only be shared in jpeg format in most cases. If there is a need to share large uncompressed raw formats then specialized services would be needed to do that task.

Introducing Tonido Photos

tonido_photos

Tonido Photos gets rid of these caveats by taking a different tack on photo sharing. Instead of involving the photo hosting site, it makes photo sharing private and direct. When you share photos via Tonido Photos, photos are sent directly and securely via the Tonido network to other Tonido users directly to their desktop.

Some of the features Tonido Photos are:

1. Ensures the privacy of  your photos. Photos are directly transferred from your machine to whom you have shared with. Photos never are seen by anyone else.

2. Avoids photo uploading. Just drag and drop new subfolders inside a folder shared within a group and Tonido photos does the rest. There is nothing else to do.

3. Users get a copy for archiving. The copy resides locally because Tonido photos will transfer the photos directly to your computer. You don’t have to be online to view your photos.

4. Organize photos. Photos are automatically organized by user, group, tag. So it is easy to look up any photo.

5. Unlimited size. Since photos are transferred from the owner to members of group, there is no photo size limit.

6. Comment, rating and tag capability. Photos can be tagged, rated and commented. The tags, comments and rating are available to the members of the group. Now you have the power of online applications such as flickr, photo.net with the privacy of desktop applications!

7. Search capability. Tonido Photos has powerful search feature to look up photos by comments, tags and names!

Getting Started

The first thing you want to do is share a specific photo folder with a Tonido Group. Note, that a Tonido group is nothing but a group of Tonido users running on different machines that are connected to each other. You can create a new group or reuse an existing group.

The second thing..err, actually there is no second step. You are done!

photos_getting_started

Tonido photos pushes the contents of your shared photo folder to the members in your Tonido group. When you make a change to a photo or add new photos or sub-folders, the changes are seamlessly synced to other Tonido instances. Tonido photo transmission occurs using the Tonido Network, which is a peer-to-peer network. It requires no configuration or setup. Note, that Photos ensures that only members of the group that you have shared photos with actually get the photos and no-one else.

Resizing is for Dummies

Photos works with full sized images. It will automatically work with images without imposing any silly size limits or resolution limits. Now you can fully share your glorious 21 megapixel image from your 5D MKII so that your family can make a huge blowup. The only limit is the space in your hard drive. And for ease of use, Photos will generate smaller thumbnails and reasonable sized slideshow images automatically from the large image. But the full size image is just a click away if you need it. Note that photos formats [png, jpg, tiff, cr2, crw, nef, bmp, ps] will be transferred to the members of the group but the photos browser based UI will only display jpeg images.

Faster Downloads similar to Torrent

Tonido Photos allows users to download photos not only from a single person, but from multiple people in the group if they already have that photo. So, say if you are downloading photos from someone in a group, if that same photo is also available with other members in that group, your photos will reach you faster as transfer is invisibly done from multiple members at the same time. So your download speed will not be limited by the upload of a single member in a group.

Interaction Capabilities

photos_interactions1

Photos gives you the same set of tools to discuss and communicate about photos as you find in any photo sharing site, like Photo.net or Flickr. You can comment and discuss photos. You can rate photos and also tag photos. In short, you can still do the same things you do on most photo sharing websites. Photos also provides activity streams, that allows you to see who has done what. Every comment, every rating generates an entry in the activity stream; so you never miss a thing.

photos_interactions2

Organizing Capabilities

photos_organize

Photos offers a rich set of capabilities to slice and dice photos received from others. You can choose to view photos (and slideshows) by a specific user, in a specific date range, or from a specific group. You can mark certain photos as “favorites”, so you can quickly view them later. You can tag photos, and retrieve photos with a specific tag. All these help users keep up with the huge amount of photos that can start arriving. Of course built-in search is available. You can also browse photos that are  top rated, recently comment, recently received etc!!

photostags2

Controlling Tonido Photos

photos_limits

With such an effortless way to transfer photos, it becomes extremely important to finely control the photos that do come in. Tonido Photos allows you to set size limits on the total amount of photos that can be downloaded to your hard drive. Additionally, you can delete received photos and it will never re-retrieve them unless new photos have been added or existing photos are changed! Not only that, you can selectively block a certain Tonido member who is in your group and your photos will not reach him nor will his reach yours.

If you want your photos to reach and be adored by millions of people, Tonido Photos might not be for you, but for the rest of us who value privacy, we think that Tonido Photos is a great alternative.

Like what you see? Get Tonido.

Facebook, Sixth most populous kingdom on earth

Quoting Mark Zuckerberg from his offical response to the Facebook’s Change of Terms of Services (TOS) controversy,

More than 175 million people use Facebook. If it were a country, it would be the sixth most populated country in the world. Our terms aren’t just a document that protect our rights; it’s the governing document for how the service is used by everyone across the world. Given its importance, we need to make sure the terms reflect the principles and values of the people using the service.

The reason why I am referring to Facebook as a Kingdom is because it acted very much like a monarch by changing the TOS unilaterally. Even though it is within Facebook’s rights to change the TOS, it seemed like a Royal decree saying “If you post it, we own it. “. Further, they did that without any impunity or an iota of concern to its 175 million users’ views. The move was really dumb considering Facebook’s so called 35 billion dollar valuation is totally dependent on user generated content.

I understand that people’s social maps and networks can get quite complex .When a user deletes his/her Facebook profile, removing all the user info completely may not be possible due to technical reasons. For starters ,the underlying software system might not have been designed to perform such a scenario. Instead, if Facebook had modified it’s TOS to something like the below, then there would not have been such a big uproar.

Upon termination of Facebook service, Facebook will make an attempt to remove user information to best of its ability. But we cannot guarantee that all the related information will be removed. Users should be aware of this before posting any information.

Instead they went overboard with their changes.

The following sections will survive any termination of your use of the Facebook Service: Prohibited Conduct, User Content, Your Privacy Practices, Gift Credits, Ownership; Proprietary Rights, Licenses, Submissions, User Disputes; Complaints, Indemnity, General Disclaimers, Limitation on Liability, Termination and Changes to the Facebook Service, Arbitration, Governing Law; Venue and Jurisdiction and Other.

Now the TOS causes a real concern. Sometimes, when you mess up on a massive scale, the best way to salvage the situation is to accept the mistake and say “We are sorry. We screwed up. We sincerely apologize for our indiscretion and we will make every attempt to remedy the situation”. But that didn’t happen. Instead Mark Zuckerberg, Facebook CEO came up with this mambo-jumbo,

Still, the interesting thing about this change in our terms is that it highlights the importance of these issues and their complexity. People want full ownership and control of their information so they can turn off access to it at any time. At the same time, people also want to be able to bring the information others have shared with them—like email addresses, phone numbers, photos and so on—to other services and grant those services access to those people’s information. These two positions are at odds with each other. There is no system today that enables me to share my email address with you and then simultaneously lets me control who you share it with and also lets you control what services you share it with.

Did anybody understand what he said? Or is it just me!

Social networking sites are like banks. They create value only if people create content or deposit money (in case of banks). If the service provider sabotages customers’ trust, I don’t see a sustainable future for that particular business. Who knows, Mark Zuckerberg’s law of information sharing might take a “U” turn now. I don’t know how others view the whole episode But I have lost my trust in Facebook.

On a lighter note,check out the geekandpoke cartoon I found relevant to this controversy.

facebookcartoon1

Reset your internet router now

If you have not powered off/on your home internet router for a while please do so. It might speed up your connection and save the internet as well.

SSH without password using Putty

SSH Protocol

SSH (Secure Shell) is a network protocol that provides secure access to a computer (mostly Unix based).  When you want to connect to a remote Unix server, SSH is one way of accessing the server. SSH is very powerful by combining both security of the data transmitted over network and accessibility to the remote system. SSH protocol works between two computers by a client-server architecture. When a client computer connects to the server, the server requires the client to authenticate itself. There are different ways a client can authenticate itself to the server. A typical authentication mode will be to enter a password when logging into a remote system. In this howto we can explore another mode of authentication in which server doesn’t require a password to be entered by the user. This mode will be very useful if you are connecting to a remote system frequently and dont want to enter the password everytime.

Before we see the steps, just to give a background on the components involved:

SSH SERVER

When you need to connect to a remote computer via SSH, that computer should have a SSH server running on it. All Unix based distributions ( Linux, Mac OSX etc.,) includes a ssh server. For Windows based systems Cygwin can be used as an SSH server.

SSH CLIENT

Assuming your remote computer has an SSH server running on it, to connect to that computer you would need a SSH client on the local computer. On Unix based systems, SSH clients are available as command line utilities. For Windows based systems, putty is an excellent client. Check here for more information about putty.

CONFIGURATION

  1. We start the configuration at the client windows computer. Download the latest version of Putty.exe and Puttygen.exe from here. Using the Puttygen tool we have to generate an authentication key. This key will serve as a substitute for the password that will be entered during login.
  2. Start puttygen.exe by double clicking on the executable. The following window opens up.

    puttygen window

    Puttygen Window

  3. Leave the default ‘SSH-2 RSA’ selection and click on the ‘Generate’ button. The following window opens. Move mouse randomly over the empty space below the progress bar to create some randomness in the generated key.

    RSA key generation by Puttygen

    RSA key generation by Puttygen

  4. Don’t enter any key phrase. Click on ‘Save private Key’ button. Click ‘Yes’ on the window asking for confirmation for saving the key without a password.

    Key generated successfully

    Key generated successfully

  5. Save the key file to a safe location (Let us assume you will be saving it as C:\Personal\SSHKey\Laptop.ppk).
  6. Now you can close the Puttygen window.
  7. Open the Laptop.ppk file in a notepad. Copy the four lines under ‘Public-Lines’ section to windows clipboard.

    Copy Public Key Section

    Copy Public Key Section

  8. Now open putty and connect to the remote system using the user id you want to use for future no password connections. (Let us assume you will connect to the remote machine using user name ‘ubu’. This time when you login, you have to provide the password at the prompt. Future logins won’t require this password.
  9. Under the logged in user’s  home directory there will be .ssh directory, under that create a new  file called authorized_keys using a text editor such as vi. (In our case the file will be created under /home/ubu/.ssh/authorized_keys).
  10. Type the word ” ssh-rsa ” (including  spaces on both ends of the word) and paste the 4 lines copied from step 7. Remove the carriage return at end of each line, merging four lines into one single line. Be careful not to delete any characters while doing that.  Final output should like the following window.

    Add generated key to remote system

    Add generated key to remote system

  11. Save the file and quit the text editor. Assign rw permissions only for the owner. $ chmod 600 ~/.ssh/authorized_keys.

    Set file permissions

    Set file permissions

  12. Now we have configured SSH server, its time to test our setup.
  13. On the local system, open Putty, enter the ip address details of the remote system.
  14. Now from the left navigation, select Connection -> Data. Enter ‘ubu’ as ‘Auto-login username’ on the right panel.

    Enter User name on Putty

    Enter User name on Putty

  15. Again from the left navigation menu, scroll down and select Connection -> SSH -> Auth. Enter the path of the saved private key file ( In our case C:\Personal\SSHKey\Laptop.ppk ). Leave other defaults as such and press open button.

    Specify key file location

    Specify key file location

  16. Now the putty connects to the remote SSH server and there won’t be any password prompt here after :-) .

    No Password Connection

    No Password Connection

Caution
SSH is a powerful tool and relies on password as a security. We just bypassed that security for sake of convenience. If a hacker get holds of the private key we generated, it allows a free access to your systems. So use this technique with care.

Protect your children

Would you let a stranger come into your living room and browse your children’s photo album? If not, why would you use online storage services to share your children’s photos?

Every time you upload your children’s photos online to share with your friends and family, you are exposed to the risk of sharing them with unwanted strangers. Not only are you compromising your personal life, but you are letting the online services index your life.

What I mean by indexing your life is, your online activity is monitored without your knowledge. Please don’t be naive and buy into false claims of online security and privacy made by online services. Just to test your online privacy type in your name in www.pipl.com. You will get information of the online accounts you have opened and more. I am sure that when you opened those online accounts you wouldn’t have thought about yourself being exposed. These online services are selling your personal information even though they might claim they don’t.

Share your children’s photos with your trusted family and friends, not with everyone. Take control of your digital life in a better and safer way.

For safer sharing, checkout www.tonido.com