Tag: how-to

Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

In this tutorial we will show how easy it is to enable Adobe Flash player to your Linux Mint 12 Live CD. As usual, please click each screenshot for a larger view.

Linux Mint 12 Live CD -no flash

Linux Mint 12 Live CD -no flash

First step is to boot up your Live Disc and open Firefox. This screenshot shows what will happen by default if you try to view content that relies on Adobe Flash to display.

 

 

 

 

 

Type mint-flashplugin-11 into Software Manager

Type mint-flashplugin-11 into Software Manager

Well, obviously that is going to severely limit the functionality of your Live CD, so the next step is install Flash the easiest way I’ve found. Click on Menu and choose the Software Manager (the yellow star). In the search box, type mint-flashplugin-11  then click on it in the list.

 

 

 

 

Click Install

Click Install

Once you’ve clicked on the mint-flashplugin-11 that appears in the list, you’ll see the next window that will have the Install button. Click Install and the Flash player will install to the Live CD environment.

 

 

 

 

 

Now, once it’s installed, close the Software Manager and reload Firefox. Voila! Your Youtube page you were trying to watch earlier is now working!

Linux Mint running Firefox with Flash installed

Linux Mint running Firefox with Flash installed

That’s really all there is to it. If you follow these steps you will find installing Flash much easier than trying to click the “Missing Plugins” button that first appears.

©2012 Linux.Bihlman.com

post written using Firefox on the Linux Mint 12 Live CD!

Tags: , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Windows XP doesn’t come with a utility that allows you to see what files/folders are taking up the most room on your hard drive.  Don’t fret: sure there are programs out there you can download and install to do the job, but did you know you don’t have to actually install any software on Windows to actually find out what’s hogging all of your disk space? Well, it’s really easy as long as you have a Linux Live CD lying around. In this tutorial, we will be using Linux Mint 12 since it’s very popular right now in the tech world it’s currently leading the pack according to Distrowatch. Baobab, more commonly known as Disk Usage Analyzer, is part of gnome-utils and it is just an awesome graphical disk usage analyzer. You’ll find it on just about all Linux distros running the GNOME desktop environment.

Linux Mint screenshotStep 1:

Fire up your Linux Live CD running a GNOME desktop environment, in this example you will see we are using Linux Mint 12. Then, navigate to: Applications | Accessories | Disk Usage Analyzer

 

Disk Usage Analyzer

 

 

Step 2:

Here you will see Disk Usage Analyzer, and since we are in a Live environment, it defaults to the Live CD environment as shown on the right. Click on the green “Scan a folder” icon.

 

Choose filesystemStep 3:

Choose your hard drive listed on the left side. It will be the item that mostly likely has a size listed in GigaBytes – In this case it’s my 39 GB Filesystem. Then click Open in the bottom-right corner. If you have multiple hard drives they will be listed here as well.

 

Windows filesystem displayedStep 4:

After the filesystem is scanned, it displays the top folders on the left in list form, also graphically on the right side, showing color-coded comparisons of each folder. You can also view it as a treemap chart if you choose.

 

 

Hopefully this tutorial will give you some ideas on how even if you don’t use Linux as your daily operating system, you can take take advantage of some of the unique capabilities you gain by at least having a little Linux at your disposal!

© 2011 Linux.Bihlman.com

Tags: , , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

GNU-Linux Tools – Regular Expressions Basics

By Rand Whitehall

A regular expression, (also known as regexp or regex) helps us match a string of text. They can also match specific words, groups of words or characters.

Now, by themselves, regexps don’t do much. But combined with Linux search tools, they are very powerful. Here we’ll use the grep tool with regexps.

Now let’s take a look at an example. Say you wanted to find all the lines in a text file that started with the word “Joe” in a text file called bob.txt. You really can’t do this kind of thing with a typical GUI search tool. But with grep and regexp, it’s easy. Well, easy once you get the hang of it!

Our file bob.txt contains six lines:

Bob is a great guy

Unlike his buddy, Joe.

Bob likes to work.

Joe is a real bum.

Joe likes to watch other people work.

Jim is my hero.

James is not.

Here’s the grep command:

grep ‘^Joe ‘* bob.txt

Output:

Joe is a real bum.

Joe likes to watch other people work.

Notice how only the lines that start with Joe are printed?

The ‘^Joe’* part is the regular expression.

The ^ means start at the beginning of the line.

“Joe” means search for the word Joe.

The * is a wildcard meaning anything can come after Joe.

What if we wanted to match all lines in which the second letter is “o”?

In this case we need to use the. (period), which tells grep to search for any single character.

grep ‘^.o’ bob.txt

Output:

Bob is a great guy.

Bob likes to work.

Joe is a real bum.

Joe likes to watch other people work.

The [] brackets, are used to match a range of characters. For example, we could search for any lines that start with a “J” then any letter between a-m.

grep ‘^J[a-m]‘ bob.txt

Output:

Jim is my hero.

James is not.

Now, even though Jim starts with a “J”, it is excluded because the second character is not between a-m.

I hope this gets you more familiar using regexps. Please be aware that there are several versions of grep and some use slightly different regexp expressions. If you find a great regexp on the internet and it doesn’t work on your system, it may be because it’s not compatible with your particular version of grep. We’ve only touched the surface here, but I hope this gives some understanding of regexps and a hint at how powerful they can be.

Rand’s Adjustable Safety Razor website is a fantastic resource for old-school double-edge razor fans. Check out the Merkur safety razor page for info on Merkur’s adjustable safety razors.

Tags: , , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

By Clyde E. Boom

Linux Commands – The great thing about Linux commands is that they are virtually identical from one Linux distribution (version) to another. So the way the real pros do Linux administration is to work at the Linux command line and run Linux command lineLinux commands.

Learning how to run a Linux command can be very difficult for someone new to Linux, so here are some Linux tips that will help you to learn how to use Linux commands when working at the Linux command line prompt.

There are three main parts of a Linux command:

1. The Linux command name

2. Options that can be used with the Linux command

3. The “item(s)” that the Linux command is being run “on”

When you run a Linux command, spaces are used between: the Linux command name, the command options and the “item” the command is being run “on”. The “item” could be a Linux directory, file, user or some other Linux software component.

For example, you run the Linux command named ls (for list) “on” a Linux directory to see a list of files in the directory. You run the Linux command named rm (remove) “on” a Linux directory to remove the directory from the Linux file system.

To run a Linux command, you type in the name of the command, and any other parts of the command, such as options, and press the Enter key.

You can see an example of the Linux command that is used to create a new Linux user below. The useradd command is being run “on” the bthatcher user name to create this Linux user.

Linux Tips: Linux commands are run at the Linux command line prompt and this prompt is shown as ]# at the left of the command. You don’t type in the prompt, you type the Linux command at the right of the prompt.

Linux Tips: The Linux command prompt may also appear as: ]$ or as another symbol, instead of # or $.

]# useradd -c “Becky Thatcher” bthatcher

This Linux command creates a new Linux user named bthatcher with the full name of “Becky Thatcher”. The -c (for comment) option is used with this command to add the full name as a comment to the Linux user name of bthatcher.

One of the easiest and best ways to get Linux training is to see Linux commands being run in Linux video tutorials. With this method – you see, hear and do.

With a Linux video tutorial, you see and hear how to run a Linux command and see and hear a description of the output of the command. You can also pause the video so you can run the Linux command yourself!

Copyright ©  Clyde Boom

Clyde Boom, Author and Expert Trainer with 20+ Years of Training Successes. Explains intricate technical matters in an easy-to- understand, non-technical manner, with tens of thousands of software and hardware learners into masters.

You can watch Free Sample I Learn Linux Video Tutorials at http://www.iLearnLinux.com and get over the steep Linux learning curve.

Sign up for Free I Learn Linux News to receive technical tips, info on new video samples and important updates on Linux.

You need to learn Linux the easy way to get that new job, qualify for that next promotion, earn a hefty raise, get Linux certification, or keep your current job because your company is trying to save on software licensing fees (eza). Watch, do, and learn!

Tags: , , , , , , , , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

How to Delete and Recover Files in Linux

By Luqmaan Ameen

Linux is a reasonably famous Operating System especially among programmers. The default file system in Linux is known to be intolerant when it comes to user mistakes, but using the method described in this post, you will be able to recover any data that you lost or accidentally deleted.

Deleting Files In Linux

Deleting a file in Linux is quite simple. You just have to right-click the file icon (which you want to delete) & then click the “Delete” option in the context menu. If you are working from the command console or terminal, the delete command is “rm” for remove. The “rm” command accepts a number of parameters which can be both unsafe and extraordinarily useful. The most famous parameter pair is “rm -rf”. This command deletes everything that’s present inside the specified folder, recursively (r). Moreover, this command does not ask you to confirm the deletion of each file. This means that you can accidentally delete the entire File system. This could be dangerous in some cases.

There is no recycle bin in Linux. So if you delete a file, It will no longer be available on your hard disk. Other operating systems however, usually have a recycle bin, which is just a folder where all the deleted files are preserved where they can be recovered or permanently deleted from there.

Recovering Files in Linux

Linux is famous for being customizable, there is a little tweak that can be made that will add the recycle bin functionality. You can simply add an alias to their.bashrc file, in a user’s home directory, that overrides the rm command. The alias is as follows:

alias rm=’mv –target-directory=$HOME/.Trash’

This alias would change the rm command into the mv, move command and send any files sent to be removed to the.Trash directory in the user’s home folder however this is not the best solution to save files from being lost as this may sometimes cause confusion with other aliases.

Another way of recovering files in linux is by using a process known as ‘File carving’. This application parses the hard disk for the leading and trailing bits of a file and then uses those bits to identify the file type and group together the deleted file on the disk. It is a reliable technique and is used by forensic data recovery.

You can use 3 main application for file carving: foremost, PhotoRec, and scalpel. From a console window, enter the application’s name, followed by the hard drive partition’s name found by using the “fdisk -l” command (ex. /dev/hda2).

Using the above two methods you should be able to recover or delete files in Linux in virtually any situation.

Luqmaan Ameen is the main writer behind Computer Realm, a blog which focuses on computer tips and several other aspects on computers and the internet in general. Cannot delete file? If so, you can find a free solution on http://www.computer-realm.net/cannot-delete-file/ on his site.

Tags: , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Linux Command Syntax and Command Help

By Andrey Jone

Linux Command Syntax can be very confusing. To compound matters, every command has slightly different Syntax. When you enter a command you will need to know what switch or options to use. This will allow you to turn a common command into a powerful tool.

One important thing to keep in mind is letter case. In Windows it does not care if a letter is capital or lower case. In Linux alphabet case matters. If you were to type “find” and “Find”, Linux would view these as totally separate entities. “find” is the command to search the file system. With the correct options it would perform a system search. “Find” is not defined, it will error out. Linux also does not like spaces. You should not name a file or directory including a space. If you are using multiple words you can divide the two words with a symbol such as “this_directory”

Command Help

For every command there are two levels of help. This will allow you to begin learning about what that command can do. The first way to look the help screen is this:

"commandname /help" or commandname /?"

This will give you a good starting point to learn the command options and syntax.

The second level of help is called a man page. “man” is short for manual. Most commands have a man page and its normally a couple pages of information about the command you are using. You can see any of the man pages by typing:

"man commandname"

Special care should be given when typing any Linux command. In Linux normally quotes are used to define and separate variables. In some cases multiple command options can be separated with commas. This is normally for user input though. For a simple idea about syntax we can break down the find command here:

find / -name 'httpd.conf'

Here we have the find command, the “/” states what directory to search in. I have chosen root, however you could just as easily put any directory name. The “-name” basically tells find you are searching by name. Finally I have put the name in single quotes. In this case the quotes are not required.

Certain commands in Linux can be used with other commands. You can use “|” the pipe command to pipe output of one command through another. Such as

ps -ef | grep httpd

This is a process command to list all process’s. However you are taking the output of this command an piping it to the “grep” command. In this case it will only show the process’s associated with “httpd”.

Another command switch that works for most any command is “>” .

"find / -name httpd > list"

This will print the command output to a file called list.

Linux command syntax is hard to pick up at first. However through learning you can unlock the unlimited potential that your Linux System has to offer. Much more information about Linux commands can be found online. There are many good resources that will help you learn the commands of your Linux system. By using online sites, the man pages and command help you can soon become very familiar with your system.

Andrey Jone shares his views about Linux Command Syntax and Command Help. For more information on Linux Command Syntax and Command Help, please visit http://www.webhost.org

 

Tags: , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Linux – Find Files Containing Text

By Selwin Verallo

Because of our being forgetful in nature, we oftentimes forget the files that we have created. We can only be fortunate if we can still remember the path, folder, or directory where we have stored those missing files. If that’s the case, it would never be a big deal then. However, trully this a big problem and even painful if we can’t even remember where we have placed the missing files in our computer. “Simple,” I’m hearing you… “find it.” Yeah, we can find it. But wait, do you know the filename?

Forgetting files and forgetting the filenames are most common in us. I will never believe somebody out there have a photographic memory and has never experienced missing some of the files he had created before. For sure, we all have gone through that frightening experience especially if the file that is missing is so precious to us.

In Windows, this problem can easily be addressed just by using the find or search tool in the Start menu. Can you remember some texts or phrases in the filename? Use “find files with names” and unleash the power of the wildcard character (*). For example, if you can only remember the word “statistic” in the filename, then search for “*statistic*” and that will search for files with the word “statistic” in the filename. “I can’t even remember a word in the filename,” again I can hear you saying that. Well, I don’t think you can’t even remeber even a single word in the file content itself. If you can’t remember even a word or phrase in the filename then go for the file content itself. In Windows, still you can search for files containing some texts that you specify in your “find files containing text” input box. That will absolutely solve your problem of forgetting words in the filename itself.

However, if you are in Linux, the whole thing would be more different and complex than it is in Windows especially if you are just a normal user dependent on the GUI interface. Linux is more on executing commands from a shell.

So if you are a normal user and that you are facing the “missing files” problem in Linux, don’t worry, I will show you the most common methods in solving this issue:

Find files that contain a text string

grep -lir “text to find” *

The -l switch outputs only the names of files in which the text occurs (instead of each line containing the text), the -i switch ignores the case, and the -r descends into subdirectories.

Find files containing search terms on Ubuntu

To find files containing keywords, linux has a powerful command called grep, which you can use to find the lines inside any file or a list of files.

grep -i -n ‘text to search’ *

List files containing text

Used to recursively search a directory for files containing a string, output the names of the files and the line number. This will search all regular files in for.

grep –with-filename –line-number `find -type f`

Find more tips and techniques at Smart Pad

Tags: , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Understanding the Linux File System
By Brandon Sherwood

The way Linux organizes its files on the hard drive is vastly different from how Windows handles this task. New Linux users coming from Windows sometime have a hard time maneuvering though directories or come with notions that Linux should manage its files in the same vain as Windows.

This article was written to help new users get a grasp on moving through directories on their new installation. One key point to make is Windows deals with “drives” as in your C: drive or D: drive, Linux deals with something called ‘mount points’. These are locations where other hard drives, CD/DVD burners, etc… connect to the root partition. Don’t worry it will all make sense latter on.

It All Begins With Root: /

The root directory known simply as ‘/’ is the starting point. Without getting to technical, the root directory acts like the ‘C: Drive’ in Windows. A Linux system can not fully boot without a root partition, in the same way as deleting your C:WINDOWS folder will make your Windows computer inoperable.

It’s In: /bin

The /bin folder holds important system programs. The ‘bin’ is short for ‘binary’. Some of the popular programs: date, less, more, cat, dmesg. These programs are essential in order to start and have a complete operating system. While you may never use one of these programs personally, the system relies on some of them.

Where Everything Starts: /boot

As the name implies, /boot is where the crucial files reside, mainly the kernel. Without the kernel, you don’t have a system. Another crucial program located in /boot is the bootloader. Just like Linux needs the kernel to function. The bootloader is there to actually locate the kernel and begin running it.

Every Device Is A File: /dev

In Linux, every device is a file. What this means is, when you connect a hard drive to your system it gets a ‘device file’ that allows the system to interact with it. When the kernel locates a new hard drive it is assigned a file like “/dev/sda”. The /dev part is the directory and the ‘sda’ part is the file that connects to the hardware. So if you wanted to format your whole drive you could type in the command ‘dd if=/dev/null of=/dev/sda’. This would copy /dev/null into your hard drive. /dev/null is a “bit bucket”. Meaning that everything that gets sent to it gets deleted.

Configuration-ness: /etc

Linux, being a customizable system keeps all the programs config’ files in this directory. Most programs come with a sensible and secure default behavior. But what happens if you want to change it? The /etc holds a slew of text files for you to open and customize how your programs operate. An important note to make is /etc manages global defaults. What this means is if you change a file this directory, it will affect the whole system.

The Shared Libraries: /lib

The /lib directory is a way to keep all software libraries in one central location. Most (if not all) files here have a file extension of ‘.so’ to let you know they are ‘shared object’ files. These files are code that can be used by multiple programs. This helps prevent a problem known as ‘software bloat’. Windows also has these files; they are called ‘Dynamically Linked Libraries’ or DLL for short. As a regular Linux end user, you will most likely never have to change anything in this folder. Depending on how you install software on your computer, you might come across a ‘missing shared object’ problem if your software “depends” on another program to function. The Windows equivalent is ‘DLL hell’.

When You Don’t Shut Down Correctly: /lost+found

This directory is used when the user does not shut down the system correctly (turning it off when the system is still up and running). Upon the next boot, the system will try and correct itself by scanning the hard drive for corrupt files and try to correct any problems that arise. If anything is found, it will be placed in the /lost+found directory for the systems administrator (you!) to see and look over.

Where The ‘Mount Points’ Live: /mnt and /media

The /mnt and /media directories are for ‘attaching’ other devices to the root directory. In Windows, when you insert a USB thumbstick, you will see the system gives it a drive letter (E:). Depending on which Linux distribution you use, the device will either ‘auto mount’ or the user has to mount the device manually. Most newer, newbie friendly distros will auto mount the device and place it in one of these directories. You will be able to browse the files within your thumbstick at /mnt/usb or /media/usb. Each distribution is different, so my example could not exactly match your results.

/media is the newcomer to the Linux scene. Most older distributions exclusively used /mnt to manage these devices, but /media is gaining ground as the default location to mount devices. Linux allows you to mount any device anywhere (as long as you have the permissions). So it is completely feasible to mount one device under ‘/bin/mount’ or ‘/var/log’. This is usually not a good idea and the /mnt and /media directories where put in place to make this easier.

The ‘Optional’ Directory: /opt

This is where users can install software if no other suitable location can be used. Most software from major Linux distributions have ‘software repositories’ which allow users to easily add and remove tons of programs. But what happens when you need a program that isn’t in the repository? In order to separate repository software packages from ‘external’ packages, sometimes the best way to install them is putting them in /opt. This practice is rarely used though and each distribution is different. Some will place the popular KDE into /opt, while other distributions won’t.

My personal rule of thumb is to use /opt when the software you are installing defaults to this directory (The Google Earth program does this) or I am installing a program that I didn’t get in the software repository.

The Kernel’s Directory:/proc and /sys

Both of these directories hold a wealth of information about the status of your system. Files like ‘/proc/cpuinfo’ contain information about your CPU (speed, vendor, cache size). The /proc directory is slowly being faded out in favor of /sys.

You Were Here And Now Your Gone: /tmp

The /tmp directory is short for ‘temporary’. So with that in mind, I am sure you can deduce why this directory is used. You got it, to manage temporary files. Programs can generate a lot of ‘junk output’ or need to write to a file to handle a task; but the file can be deleted once the task is completed. This directory provides a central location to do this and not fill your other directories with these files.

Where The Programs Live: /usr

The /usr directory is a monster. Articles could be written just to explain it all. But to keep things short and sweet, the /usr is where all of your ‘secondary’ programs are stored. Granted you love your music player, but it’s not crucial to your operating system actually functioning. So instead of putting all the executables in /bin, we break it up a bit. We place crucial system programs in /bin and non-critical programs into /usr/bin. The /usr directory could be seen as the Windows equivalent as C:Program Files .

The Not So Temporary Files: /var

/var (for varying or variable) acts like /tmp in the sense that the files located are ‘temporary’ but less ‘temporary’ then those in /tmp. What this really means is the /tmp directory will most likely be deleted every time the system reboots, while the files in /var will not. /var is a place to keep ‘persistent’ files. An example would be log files. Most system administrators wouldn’t want to delete their log files on every reboot, but the files could be removed or ‘shrunk’ to a more manageable level at the administrators whim.

Another example would be ‘/var/mail’ directory. It contains the mail being sent to users on the system. Some users will have hundreds of messages, while other users will have a few or none. The directory is growing and shrinking depending on the usage by the users. So in order to keep the disk usage under manageable levels, we place this activity under /var. On large systems, the system administrator will use a separate hard drive and ‘mount’ the hard drive at /var. This allows the frequent disk access to remain on one hard drive and keep the overall system speedy.

Conclusion

Well I hoped that this article has better acquainted you to how files are stored on a Linux system. If I left anything out (or for general praise), please feel free to comment on the article.

Brandon Sherwood

http://www.newbtopro.com – Howto’s and Tutorials

Tags: , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

How to Use Private Keys For SSH Authentication From Windows to Linux
By Don R. Crawley

Take one look at the / var / log / secure directory on an Internet-connected server and you’ll immediately understand the need for securing your root account. The bad guys are constantly attempting root and other usernames to attempt 250px-PuTTYto login to your server using SSH or some other protocol. If you use a simple password, it’s only a matter of time before your server is compromised by a password-guessing attack. Best practice is to disallow SSH logins by root, thus eliminating a big part of the risk. The problem is that doing so also eliminates a lot of convenience for sys admins and complicates the use of tools such as WinSCP for file copy from your Windows desktop or laptop to your Linux or UNIX server.

A fairly simple solution is to use public/private keypairs for authentication. The public key is stored on the Linux/UNIX server and the private key is stored on your local Windows computer. When you attempt to connect to the Linux/UNIX server from your Windows computer, authentication is done with the keypair instead of a password. Password authentication is actually disabled for root, so no amount of password guessing will work for authentication.

Here’s how to do it:

Start by downloading the PuTTY Windows installer from the Internet. Search on the term “PuTTY SSH” to find the installer. Run the installer on your local Windows computer.

Now, you must generate the keypairs. The PuTTY Windows installer you just ran installs an application called PuTTYgen that you can use to generate the keypairs. The installer probably placed PuTTYgen (and the other PuTTY applications) in Start>>All Programs>>PuTTY.

When you run PuTTYgen for the first time, you must generate a new keypair. At the bottom of the PuTTYgen window are three parameters choices including SSH-1 (RSA), SSH-2 RSA, and SSH-2 DSA. SSH-2 RSA is the default choice with a default key length of 1024 bits. Longer key lengths are more secure, but require more processing power. 1024 bits is an acceptable compromise at this time (late 2008), but may not be acceptable in the future as computer processing power continues to increase.

Click the button labeled Generate to produce your public and private keys. (You must move your mouse pointer over the blank area at the top of the screen to generate some randomness for use in producing the keypair. Just move your mouse pointer in a cirular motion over the blank area until the progress bar reaches the far right side and PuTTYgen generates the keys.)

You can now save the private key on your local laptop or desktop computer and copy the public key to the remote Linux/UNIX server.

Enter and confirm a passphrase to protect the private key in the two fields in PuTTYgen.

Click the button labeled Save private key and select a location on your local hard drive to save the private key. (Remember to protect your private key by storing it securely!)

Copy the jibberish text that is the public key (at the top of the PuTTYgen window) and paste it into /root/.ssh/authorized_keys on your server (you’ll might have to create the .ssh directory and you’ll probably have to create the authorized_keys file).

On your Linux/UNIX server, inspect /etc/ssh/sshd_config to ensure that RSA authentication and public key 9authentication are both allowed. If not, change “no” to “yes” or uncomment the lines to allow said authentication. Also, ensure that the path to the authorized_keys file is set to “%h/.ssh/authorized_keys” and uncomment the line. (I found the three lines at line 43 on a RedHat system and line 29 on a Debian system.) When you’re done, the lines should look like this:

RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile %h/.ssh/authorized_keys

Test the configuration by attempting to log on as root using PuTTY with private key authentication: From your Windows workstation, start PuTTY and enter the hostname or IP address of your server in the Host Name (or IP address) field.

In the left pane of the PuTTY window, under Category, expand SSH and click on Auth.

Click on the buttown labeled Browse… and find the private key file you saved earlier.

Click the button labeled Open to start the session When prompted for a username, enter “root”

If your configuration is correct, you’ll be prompted for the private key passphrase. If you enter it correctly, you should be authenticated as root and see a privileged prompt (On systems using the BASH shell, you should see a pound sign (#).)

You must also disable root password authentication in order to limit the root account to private key authentication.

Open /etc/ssh/sshd_config for editing and modify the line that reads “PermitRootLogin yes” to read “PermitRootLogin without-password”.

Restart the ssh daemon: #/etc/init.d/sshd restart on Red Hat systems or /etc/init.d/ssh restart on Debian systems

2-bigAttempt to do a password-based login on the Linux/UNIX server. It should be denied. Attempt to perform a private key-based login on the Linux/UNIX server as before. It should be successful.

You can use the private key with PuTTY and WinSCP. I ran into errors when I tried to use it with Tera Term, but Tera Term now includes a keygen utility which seems to work fine with Tera Term, if that’s your preference.

Don R. Crawley, Linux+ and CCNA-certified, is president and chief technologist at soundtraining.net the Seattle training firm specializing in accelerated, task-oriented training for IT pros. He works with IT pros to enhance their work, lives, and careers. Click here for a free subscription to soundbytes, the monthly ezine for IT pros.

Tags: , , , ,
Submit to StumbleUponDigg ThisShare on TwitterSave on Delicious

Wireless Network Security: How to Use Kismet
By Eric Meyer

Kismet is a wireless network detector / sniffer which can give you a vast amount of information about wireless networks. Wireless network security flaws are well documented but often very hard for the common person to understand. I will be showing you how to use kismet with out even having to install Linux, or compile kismet.

First you need to proceed to remote-exploit.org and download and burn their Auditor CD. (IF you don’t know how to burn an ISO image, go to Google). This version of Linux doesn’t install or modify your hard drive; it will boot from the CD and use a Ram Drive (On your Memory).

Auditor is not only a great tool for testing wireless network security with kismet but it also has many other computer security tools on it as well.

Client Window

Next, to start Kismet proceed to the Linux version of the start menu, and press Auditor.
Now proceed to the wireless /scanning/kismet tools/kismet.

Once you click on Kismet it will ask you for a default location to place the Kismet log files for analyzing later, just press the desktop or temp file.

Now I will show you how to use Kismet. When kismet initially opens you will see a greenish box with numbers and 250px-Backtrack_3.0_Finalnetwork names (If any are near you) clicking away don’t be overwhelmed. (Also I can’t show you how to use kismet if you don’t have the correct wireless adapter, get an ORINICO Gold Classic Card off EBAY.) The Orninco gold classic card will be automaticly detected by auditor linux.

The Kismet columns will show the wireless networks SSID (Name), Type of device (Access point, gateway) Encryption or no Encryption, an IP range and number of packets. Kismet will pick up hidden networks with SSID broadcast Disabled also, Netstumbler will not.

Now Press H, to bring up the Help Menu. This will give the nuts and bolts on how to use kismet. If you tab down to the network you are auditing and press “C”, Kismet will show you all the computers that are using that wireless access point / gateway. This Kismet screen will show you the clients MAC address, Manufacture of Wireless Adapter, IP address range and traffic.

Kismet: Help Menue

Now to get out of that screen press “Q”. Tab Down on the Main Kismet Screen to another SSID and press “I”. This Kismet window will show detailed information about the wireless network. The Kismet detail screen will show the type of network (Infrastructrure / Adhoc), signal strength, channel, encryption type, and much more.

Kismet will also give you sound alerts when new wireless networks are discovered or security alerts or suspicious clients are in range. Suspicious clients would be people like you who are using Kismet or Networkstumbler. Unlike you these could be Wardrivers looking for venerable networks to hack into.

Kismet Alert Page

You can prevent War drivers from discovering your wireless network by performing a proper site survey which will 180px-Pentest_1cd_backtrack08help limit signal bleed off to unneeded areas. You should write down the suspicious MAC address and keep an eye on your access logs. If the War Drivers are really stupid just look out your window and look for cars with weird antennas.HA HA HA.

Kismet is more than just a tool to discover wireless networks; it can be used in conjunction with other tools to crack WEP/WPA. Many websites will claim that WEP can be cracked in less that five minutes. This is only half the truth because it could take many hours,days,months to gather enough packets to crack. Good luck and have fun learning the more advanced applications of kismet.

Keep your wireless network simple and secure. Join the most popular wireless networking newsletter on the internet http://www.wirelessninja.com

Tags: , , , , ,
« Previous posts Back to top