Installing and Configuring SSHD Server on Cygwin

February 27, 2009 by Sravan  
Filed under Computers

SSH is one communication protocol that is used to access remote systems all the time. Short for “Secure Shell”, SSH provides a secure channel for data exchange, unlike Telnet and other insecure remote shells. Telnet, e.g., transmits all data including passwords in plain text.

For a system A to connect to a remote system B through SSH, A needs a SSH client (like PuTTY for Windows) and B needs a SSHD server running all the time so as to accept incoming connections.

SSH is a proprietary software offered by SSH Communications Security, and as an alternative the open source version OpenSSH is being widely used. On all Unix-based OSs, the OpenSSH SSHD server is installed by default during the installation of the operating system. On Windows, however, it is not the case.

You can install it on top of Cygwin very easily. You will need administrator access with a password set for the account. When you run the Cygwin setup to download or install various packages, select openssh which will select all the other packages it requires.

Once you complete the install, to configure SSHD run $ ssh-host-config –y from the terminal. This will automatically answer ‘yes’ for the yes/no questions. Give an appropriate password that follows your system rules if an sshd_server is being created or ignore this step. Specify the value of the environment variable CYGWIN as “ntsec tty” for WinXP and Vista and “binmode ntsec tty” for Windows 2003 Server (without quotes). At the end of this process, the sshd service will have automatically started and placed itself among the Windows startup list.

If you have any problems, try following this article for WinXP and Vista and this one for Windows 2003 Server or drop me a message.

Strong and Weak Passwords

February 24, 2009 by Sravan  
Filed under Computers

Every now and then a popular website gets hacked and tons of user passwords are published for everyone to see. On one side, it can potentially lead to huge losses to the users whose passwords have been compromised. On the other, security analysts use the data to gain various insights.

In one such recent attack, Robert Graham, the CEO of Errata Security, came to a few startling conclusions based on the passwords published showing what should not be your password:

  • 16% of passwords matched a person’s first name
  • 14% of passwords were patterns on the keyboard
  • 4% are variations of the word “password”
  • 5% of passwords are pop-culture references
  • 4% of passwords appear to reference things nearby
  • 3% of passwords are “emo” words
  • 3% are “don’t care” words
  • 1.3% are passwords people saw in movies/TV
  • 1% are sports related

You can read the complete report here.

Password management is a big hassle that every Internet user has to deal with today. Apart from the regular ones that I use, I try out new products and services all the time and have over 50 different accounts as I speak. So I use a password management software called KeePass, which is open source. In the past, Jesse suggested several others like Billeo, Vidoop and Passpack. These softwares usually are also capable of generating strong passwords or you can use an online service like the Strong Password Generator to generate a password for you.

The most basic rule is to use a long combination of small and capital letters, numbers and symbols. Read this Microsoft Security article about how to create and use strong passwords.

Cygwin Commands for Text Manipulation

February 20, 2009 by Sravan  
Filed under Computers

DOS has a few commands like find, findstr and sort which can be used to manipulate text. ($ help <cmd> shows the usage help for all these commands.) However, their usage is very different from those that a Unix user may be familiar with.

One of the best things about Cygwin is that these commands useful for “quick and dirty” work on large chunks of text data are easy to learn, are consistent across all Unix-based OSs, have a number of options, and are quite extensive. When used in combination, they can save a lot of programming.

($ <command> <option> <inputs> is the general format for almost any of these commands. $ <command> –help shows the usage information.)

Note that all the commands below work on text files, not just any files with text content in them.  e.g. a .DOC or a .HTML contains many other headers which are also taken into account when processed by these commands.

wc: wc is short for “word count”, but it counts more than just words. It can count chars (-m), lines (-l) apart from words (-w).

uniq: When files have a large number of lines with many identical ones, uniq returns only once all lines among the input files after discarding repetitions. –c also gives the number of times each line has been repeated, –u returns only the unique lines discarding any line which has been repeated more than once, –i considers two lines non-unique if they are only differing the case.

sort: Say you have several files with numbers or words that need to be sorted. Sort can sort a concatenation of several files at once, where each line is considered a separate value to be sorted. The sorting order can be specified as in –d means dictionary-order, –f means ignore case, –n means numeric sort, –u means sort only unique lines.

grep: Short for “get regular expression”, grep can be used to search for a specific string or string pattern (called regular expression) in given text. $ grep “grep” <this-post> shows all the lines with the string “grep” in them. –c is used to count the number of occurrences, –i is used to ignore case, –v is used to invert the result.

sed: sed is used primarily to find and replace a string or string pattern from files. The most common usage is $ sed ‘s/<find-string>/<replace-with-string>/g’ which replaces all occurrences of <find-string> with <replace-with-string>.

Use CCleaner to Clean Your Computer

February 19, 2009 by Sravan  
Filed under Computers

There are a lot of utilities that can be used to clean a computer. These do something more than the usual “Disk Cleanup” ($ cleanmgr), are easy to use with custom features and are faster too. Cleaning up your computer can improve its performance and ensure greater privacy. For a while now, I have been using Piriform’s CCleaner. It is one of the most comprehensive utilities of its kind.

CCleaner Screenshot

CCleaner’s primary feature is the Cleaner. First, it will analyze the system, fetch the files that it is going to delete from the recycle bin, browser caches, other application caches, and many other obscure locations. The user can choose which areas to scan for and which to leave alone. Then the files can be deleted using any of the four secure file deletion options, but be warned that the greater the number of passes the fewer the chances of recovery if needed. There are many other customizations that can be made, like specifying the files and folders to be deleted and those to be excluded (apart from the usual set), the cookies to be preserved, and running from the command line.

CCleaner also has a registry cleaner than cleans the registry for any old or unclean or deleted entries. I think this feature can be made more robust. Be sure to save the registry before editing it.

Two other tools that come along are the “Uninstall” and “Startup” tools. The former can be used to uninstall programs. It is faster than the conventional “Add or Remove Programs” in loading the programs and also loads most programs unlike the regular option. The “Startup” tool can be used to disable or delete various startup processes, equivalent to the options provides by msconfig.

One other (unnecessary) feature I like about CCleaner is the way it displays the OS and the processor details when opened.

CCleaner is a regularly updated free software with new versions released every now and then. Download the latest version from the official CCleaner website. It is hardly 3 MB.

Image Source: CCleaner on my PC.

Google Your PC Using Find

February 13, 2009 by Sravan  
Filed under Computers

find is an elaborate search program with a number of features. Unlike the Google Desktop Search and locate, it doesn’t index anything but processes the request on the fly. Thus it is slower.

find is one of the most useful commands when you also have to search within unknown files and make further operations on the result set. It does a recursive search, looking in all subdirectories.

The first set of arguments is always the paths where the search should initiate. $ find /home /tmp <remaining arguments> would search based on the remaining arguments in /home, /tmp and all their subdirectories. If unspecified, the default path is taken as ‘.’, the current working directory.

To search for a specific filename pattern, –name <regexp> is used as the next argument. $ find /home /tmp –name *.sh returns all .SH files present in /home, /tmp and their subdirectories.

Instead of piping, to perform any operation on each of the results returned, –exec is used. $ find /home /tmp –name *.sh –exec grep todo ‘{}’ \; –print searches for the string todo in the above returned files. grep does the search and ‘{}’ implies that all results need to be processed. The –print prints the final output, the actual lines containing the specified string in the files.

Instead of grep, it could be chmod or chown or any operation that can be done of files. These above options are the most common use cases of find.

There are a number of other options to refine the search like complex expressions with boolean operators, the maximum and minimum depth of subdirectories that need to be traversed, the modification times and permissions on files, the file types, etc. You can read about all these in the manual page.

$10 Computers in India

February 5, 2009 by Sravan  
Filed under Computers

The last week has been filled with frenzy here in India with rumors about a $10 laptop. Not $100. It is $10. The prototype designed and developed by IISC Bangalore and IIT Madras (my alma mater) was unveiled today. Immediately, it has been hit by very negative reviews with reporters disappointed that it isn’t really even a netbook with scaled-down features. Of course, you can’t yet get a computer that costs 40 times less and has similar functionality.

Called “Sakshat”, the concept is similar to OLPC. While screenshots aren’t out yet, Sakshat has a small screen, 2GB disk space, wi-fi connectivity, computing capabilities, and perhaps some open source software. It has been created to hold textbooks and access online e-learning materials. As an alternative to text-books.

The first batch is expected to be shipped to some colleges in another six months.

Read The Hindu’s article covering the prototype launch (has one image).

Happy Birthday Lifehacker

February 2, 2009 by Sravan  
Filed under Computers

I am two days late, but never mind. Lifehacker, the fabulous site with everyday tips and downloads for getting things done, had its first post on 31st Jan 2005. What a phenomenal success it has achieved in these four years!

On this occasion, the super blog has two interesting posts: Our Best Posts From 2005 to 2009, and Weirdest and Most Controversial Posts.

Lifehacker Upgrade Your Life I am especially thankful to Gina Trapani, the blog’s founding editor, for introducing me to Cygwin and the todo.sh. She used to make frequent posts but has been writing only a weekly column on the blog these days. She released a book, Upgrade Your Life: The Lifehacker Guide to Working Smarter, Faster, Better, which consists of all the best hacks from Lifehacker.com’s archives, and her personal manifesto on working more efficiently in the digital age. Check out the official web site of Upgrade Your Life to browse the table of contents and download a sample chapter.

Happy birthday, Lifehacker! Many happy returns of the day. I am a regular visitor of Lifehacker, a big user of Cygwin, and I hope that the four-hour-long course that I did today on time management nudges me enough to become a daily user of todo.sh.

In this spirit, dear readers, here is the ultimate list of free Windows software from Microsoft. Enjoy.

A Massive Tech Channel Roundup

February 1, 2009 by Sravan  
Filed under Computers

I’ve realized that my last Tech Channel Roundup was nearly a month ago and I’m guilty of it. So, bear with me as I overload you with a number of interesting links that I found in some of the sister blogs.

Milo discovered a product especially useful for enterprises of all sizes called Nightwatchman, a good news that Microsoft didn’t lay off anybody in the Vista team. I knew that they didn’t touch the Silverlight team, but frankly I’m surprised about this because Vista hasn’t been very profitable to Microsoft. Or has it? One bad news is the Windows 7 minimum requirements. It may not be a good experience to try it on my netbook which just meets the minimum requirements and my laptop which is old enough to even miss the minimum. But if anyone is interested, you can get the Windows 7 look into Windows XP. He also found a couple of amusing videos, one called “how to say i love you.” and another a confirmation of love, a marriage at Taco Bell. Recession, aye?

Jason found a few websites that can assist you in unique ways: one for helping educate your kids, one a calendar to help others, and another to scan your computer online. He covered a lot of Windows Powertoys, a mobile media browser and found another reason to continue loving Zune. He also has a couple of how-tos for selecting non-linear text in a word document and sharing Outlook calendar availability. One bad news, I mean another one, is that Microsoft is shutting down MSN Groups.

Claire thought out loud about the gap between Linux and mainstream users, learnt something new about less (which all you Cygwin users may find useful), discovered a wonderful browser called Kidzui which attempts to make the Internet a more kid-friendly place.

Juan wonders whether the Mac is not invincible anymore and whether Apple really needs to make a netbook. He is glad to find a symbol cheat widget and an app that can save his day with a bunch of drawings. The latter isn’t my cup of tea. He along with Jayvee found out about Apple’s stand on piracy.

Launch Your Programs With Launchy

January 31, 2009 by Sravan  
Filed under Computers

Launchy is a nice little utility that makes life easier, especially for all those users who prefer the keyboard to the mouse, say laptop users to whom typing a few keys is more convenient that navigating using the mouse.

Launchy Screenshot 1

It runs in the background and when invoked to the foreground allows you to launch various programs that you wish. There are a few similar apps like Colibri and yLaunch, but Launchy stands out for the wide range of features that can be customized.

To start with, the hotkey used to invoke Launchy can be set. I choose “Win + Space” instead of the default “Alt + Space” because the latter is already a keyboard shortcut to invoke the Restore menu. GUI options like opacity and fade times, length of suggestion lists; system options like time between catalog updates; skins are also customizable.

Coming to the catalog, the user can set the file types to be catalogued, directories to catalogue them from, and the maximum depth in each directory up to which cataloguing is to be done. Once the catalog is indexed for the first time, you are good to go. Suggestions as to which file you want to open are at your fingertips.

I only catalog my Start->Programs list for various reasons. I keep my PC quite organized, especially the Program files, and I use a different indexer for indexing all files on the system (which I’ll write about on next Friday).

Another great feature of Launchy is the plugins.

Launchy Screenshot 2

Apart from opening websites directly from the browser through Launchy, all your bookmarks and other commonly-used websites can be added for quick direct searches; it can directly use the calculator and the Google calculator,…

Let me not go on and on and rob you the pleasure of discovering this little app. You can download it from http://launchy.net and when you install it, you also get a well-written README, so there you go.

If you really like it, buy a cup of coffee to Josh Karlin, the one behind Launchy. Show your support to open source.

Happy Birthday Mac

January 24, 2009 by Sravan  
Filed under Computers

What a journey the last 25 years has been! Here is wishing Mac a very happy birthday.

The first Apple Macintosh was launched on Jan 18, 1984. It was the first commercially successful computer with a GUI and a mouse instead of CLI.

First Mac Latest Mac

To the left is the first Mac and to the right, the latest.

Jef Raskin envisioned the first Mac and wanted to name it McIntosh, after his favorite type of Apple, but had to settle for Macintosh. That compromise allows us to call it a Mac.

One specialty of Mac is that Apple oversees all aspects of its hardware and pre-installs its own operating system (currently the Mac OS X 10.5 “Leopard”) on all Macs. Macs have always been special like the Ford Mustang, something that everyone wishes to own, but few do because of their considerably higher pricing compared to the Windows PCs.

Macs are lauded for their user-friendliness, performance, aesthetics, and quality, like most other Apple products. Check out the Mac line and tell me if you find nothing mouth-watering.

Computeworld is featuring a special series on this occasion.

For all kinds of information about Macs, visit our sister blog The After Mac.

Image Source: Wikipedia.

Next Page »


About Us | Advertise with us | Blog for EveryJoe | Privacy Policy | Terms of Use
Get This Theme


All content is Copyright © 2005-2009 b5media. All rights reserved.