Tag: server

Nagios – Web-Based Server Monitoring Software

By Christopher Pace

Is your Linux server down?

This one question has the power to keep us all up at night. Linux servers host your websites, handle your email, and manage your network. Your Linux server is the heart and soul of an online presence, since your databases and web applications all run on top of your server. Put simply, if your server is down, so is your business. Downtime means lost sales, and lost customers (present and future revenue). If you can’t afford downtime, you need a good server monitoring program. One such software solution is called Nagios, and it’s quite powerful.

Although Nagios isn’t the easiest web-based software solution to install (most of the server configuration is done by editing configuration files), it is extremely easy to use, once configured. Nagios presents you with a web-based status screen, which allows you to quickly view the status of all of the servers that you are monitoring. Nagios isn’t for just Linux servers either, Windows servers can be added to monitor as well. Once you are logged into Nagios, you can view the detailed status for all of the monitored servers by clicking on the “Service Detail” link.

From here, you can view the detailed information about when Nagios last checked the status of a service running on your server, and view the results of that last check. Pretty boring stuff so far, since nothing is broken. Let’s break the POP3 service on our server, and see how Nagios reacts. Within one minute, Nagios has flagged the POP3 service as being in a “critical” state. Nagios requires four failed connection attempts (by default), before an alert is issued. This is important, since sometimes a request is dropped by a router in between Nagios and the destination server. The Internet is a crazy place, and sometimes traffic isn’t delivered to it’s destination in time. Therefore, Nagios will wait for four consecutive failures, before it issues an alert.

Once Nagios has failed to connect to the server four consecutive times, the server is then placed into an alert status. From here, depending on your Nagios configuration, an email can be sent, a text message sent, or even a sound played through speakers connected to your Linux server.

Once we have successfully fixed the issue with the POP3 daemon on our Linux server, Nagios will remove the critical warning on the server, and place the server into an “OK” state. Once the monitored server’s status is changed to “OK”, emails and SMS text messages are once again sent, to inform everyone that the monitored server is fixed.

In addition, the host status on Nagios is now displayed as “OK” on the service status page.

In addition to monitoring, Nagios also supports the ability to create logs and uptime graphs which display host uptime and service stability in an easy to read format. Host state breakdown reports allow you to easily view and export server and service uptime reports.

In addition, you can also schedule downtime with Nagios, so that alerts aren’t issued when a service or server is taken down for routine maintenance. The downtime window is completely custom, and Nagios gives a summary of all planned downtime, by clicking on “Downtime”, on the navigational bar.

In the end, Nagios has the potential to save you both time and money. With Nagios, you won’t have to worry about whether or not your server is working- Nagios will let you know as soon as your server is unavailable.

Christopher Pace is a linux consultant who offers a variety of linux consulting services to clients. Linux administration services are offered remotely, which helps his clients save both money and time!

Tags: ,

LAMP Server Setup CentOS 5 64-Bit

By Nate Boot

So at about 1am this morning, Burst.Net finally got my server up and running for me to use. Unfortunately for me, I was already sleeping and I had work today so I wasn’t able to actually play with it until tonight. Like other VPS’s and dedicated servers out there, the server is usually bare boned with no software except the operating system. For me I decided to use CentOS 5 64-bit edition to get my web server up and running. Burst.NET had Apache 2 pre-installed on my VPS for me but that was pretty much about it. So I had to scramble around and search for an easy way to install Mysql and PHP to go with my Linux Apache server.

After some searching, I realized that it is really easy because Linux CentOS 5 comes pre-bundled with Yum. Yum is a feature that allows you to download and install software automatically. It will determine all of the dependencies and take care of the rest. I determined which packages I needed and sent off my command:

yum install php php-mysql mysql-server php-gd postgres ImageMagick ImageMagick-devel

This determined all of the dependencies and installed PHP and Mysql on my CentOS Linux server! It was so easy!! I just needed to give Apache a reboot and php was pretty much up and running. To give it a test, I just wrote a simple line of code in /var/www/html/test.php.

phpinfo();

Then visit yourhost/test.php If your php server is setup correctly, this should output all of the information about your php install and the different components that were installed with it. It will give you a list of all your configurations and plugins that are enabled.

The next step was getting mysql up and running. After the yum install, the daemon is not automatically started so you will need to start it yourself. You can start the mysql daemon but running the following command:

service mysqld start

If everything goes well, the service should start without a hitch and it will give you a list of directions for first time users. One of the most important things to do now is to set a password for the root user in mysql. Again just like everything else it is just a simple 1 liner to change the mysql password:

/usr/bin/mysqladmin -u root password ‘mynewpassword’

Thats it! After only a few simple commands in Linux, I was able to get a bare-boned CentOS 5 system up and running with a full LAMP install. This process will take a max of 5 minutes to complete. But for me.. I was busy googling it took me about 30 minutes to an hour.. so hopefully this will help you.

For more information about PHP and WordPress check out http://www.websitejourney.com/

Visit WebsiteJourney for other great tips: http://www.websitejourney.com/

Tags: , ,

Should I Use a Linux Or a Windows Server?

By Gary Klingsheim

Even some folks who are pretty computer savvy, and can make Microsoft Office jump through hoops, are less knowledgeable when it comes to the operating system (OS) and networking technology that drives the Internet. Most people who do not work in that end of the business need to do a little homework when confronted with the question, Should I use a Linux or Windows server?

There are some arcane hybrids and do-it-yourself OS schemes around, but the OS choice you have at most hosting companies today is between Linux and Windows. Hosting companies don’t always clarify exactly why one might be better than the other for a particular customer or situation, leading some folks to conclude that there is really no difference at all. This is not the case. It does matter what kind of server you use, and there are clear differences between Linux and Windows.

Licensing costs money

All the various flavors of Windows, from the multiple versions of the new Windows 7 to the “enterprise” (server) packages, belong wholly to Microsoft, also known as the “Evil Empire” to the hackers and open source fans that prefer Linux. Linux, being open source, is free. This is the first major difference with important repercussions, since the hosting company’s costs for licensing Windows will be passed on to the customer (that’s you). Free, open source Linux means lower hosting costs all around, if only by a few dollars per month.

Getting a Windows hosting package is going to be a bit more expensive, but not so much more that you should make the difference a deal-breaker. Other factors — the make and model of the servers, company location, package offer details — can affect pricing as much or more, so make sure to get the big picture and don’t bog yourself down in an “OS controversy.” That said, you should know the operational, stylistic and tech-related differences between the two server types in order to make an informed decision.

Slow down and consider

Now, simply because you use a PC with Microsoft (MS) Windows, or even built your own Web site with it, doesn’t mean you have to have a Windows server. You will access your site through such tools as Web-based control panels and FTP (File Transfer Protocol) software, and can do so from a Macintosh running Mac OS X, a PC running Windows 7 or a homemade computer running Mandrake or RedHat (distributions of Linux). Some commands will differ, perhaps, but all the tools do the same thing, in much the same way.

Slow down enough to consider what you actually need to do with your site and what you expect from the server (and hosting firm). E-mail protocols, both IMAP and POP, work fine in both environments, as do PHP, the standardized HTML and XML, JavaScript and “file helpers” like Adobe Flash and Reader. However, Frontpage extensions, ASP, the.Net environment, Access, Windows media and other MS technologies will require a Windows server. For these particular features, Linux support ranges from limited to non-existent, and trying to work around the restrictions will cost you a lot more than paying the difference between the hosting packages.

Security and management

There have been some contentious arguments about the relative stability and security records of Linux and Windows server environments. Some computer professionals are simply knee-jerk anti-MS partisans, and there are also any number of MS fans that are anti-Linux (as well as anti-Mac). The fact that Windows is the most common OS in the world has both advantages and drawbacks. Millions of people are working on making it better, and just as many are trying to shoot it down in flames.

On the other hand, Linux is now most common server OS in use and hackers have had greater than expected success subverting it, too. The fact is that the platform in use is not as important to security as systems administration, attentive technicians and company management. If security is high on your list, you need to examine the company as much or more than the company’s equipment. Don’t take their marketing materials as a promise — do some due diligence here. It matters.

A toss-up?

There is probably little difference in server performance because of the choice of OS. Again, it can come down to how the companies install their software and maintain their hardware — Linux just might be “faster” in some functions than Windows if, in fact, the Windows OS was installed in default mode and not “tweaked.” (This can be true of Linux installs, too, of course.) In the broadest terms, performance is comparable and you can have a fine, effective and efficient hosting experience with either kind of server.

The bottom line is that you should certainly consider the kind of server, particularly if you use MS technologies than need a Windows environment, but your search should be for a good host, not a good server. A company with the best equipment in the world will be no help to you if it is mismanaged, oblivious to security lapses and technologically out of its depth. With a rough equivalence in features, reliability, security and cost, a “winner” is impossible to choose beforehand. You can win — or lose — with any kind of server, so keep looking at the big picture and just make your decision.

Tags: , , , , ,

Linux Server and Home Web Hosting

By Jan Pascal

If you are interested in web design or development you should have some local test place where you can check and debug websites. If you are doing this professionally you will probably invest in a real web server. But if you are doing this for fun or the reliability and speed is not a problem then you can have a simple solution with minimal investment–own Linux server. There are also some simple and effective solutions with applications like WampServer or EesyPHP. You can use them and have a good testing environment. However, having a dedicated Linux computer offers many opportunities for additional functions. In addition to this, a physical web server running Linux is a very close approximation of the real hosting environment. To install and use such server you need no special knowledge or skills. All you need is access to the internet and computer with web browser.

To set up a small but useful Linux server you need a computer. Your old computer that was replaced with a new fancy multi-core machine is a perfect candidate for this project. Linux operating system usually runs on any machine so you should not be concerned about the processor speed or the amount of RAM. If you are new to Linux you should learn some basic tips by browsing the web. There are many websites that provide step by step instructions on how to download and install Linux on any computer. The most important rule about solving any problem is to simply google for it. Every problem you may encounter during installation or customization is somewhere already mentioned together with possible solutions or hints.

After you have a running Linux computer you should check if networking is working and if it boots without any errors. Then you need to install web server software. For this you will need at least Apache, MySQL and PHP. To upload files you will also need a FTP server software. To find out how to install applications you should again check web resources where you will find every step described in details. Before you can test your home hosting you should configure Apache for shared hosting and create few directories for your projects. This should be enough for basic web development.

Now you can put some files in the www folder and they should be visible in your browser. Simply enter the IP address of your Linux computer into the address bar of your browser and you should get your default website. You can add a line to your hosts file where you can associate a name with the IP address of the server. Then you will be able to access the server with this name.

An additional upgrade of the server can be some software to allow access from windows computers. For this purpose you can install a Samba file server which will allow you to access www or any other folder from the explorer in any Windows computer. With a Linux system running on your old computer you can get much more than just a testing environment for web development.

The author uses home Linux server for file storage and web development. One of his latest projects is a website about home hair removal which provides information about popular hair removal topics like facial hair removal for women. This website was created on the local Linux computer and then uploaded to the real web hosting server where you can access it.

Tags: , , ,

Convert Your Old Computer to a Linux Server

By Jan Pascal

Linux is a very popular platform. Not just because it is free but also because it is reliable and supports anything you can imagine. A popular setup is a Linux server without any graphical user interface. It can be used for web hosting, as a file server, as a database server, or for anything you need. Most people comfortable with Windows operating system are afraid to start thinking in a different way. In fact, installing and using Linux is pretty simple.

Once you decide to go for it you have already made the first step. The next step is to get some basic information about installing Linux. There are many Linux distributions. One that is very popular is Ubuntu. Simply Google for “ubuntu server” and learn about what do you need to install Linux. In general, things are pretty simple. You can install Linux on almost any machine. Your old computer that was replaced some time ago is a perfect choice for Linux. You only need some space on the hard drive, a CD or DVD drive, a network card and a lot of patience.

The first step is to make a bootable CD with the latest Ubuntu server image. Download the image file and burn it on a CD. Then you boot your computer with this CD and start installing Linux. It is a good idea to do this installation next to your main computer with internet accesses. This way you will be able to browse for any problem you may encounter. The most important thing you should know is that for every question you may have, there is an answer on some web page waiting for you. You only have to find it.

The installation process is pretty straight-forward. If you don’t understand what the installer is asking you then simply select the default option. Of course, you can also ask Google for it and then choose appropriate option. You should understand that the Linux principle is very different from the Windows one. But once you become familiar with Linux shell and basic commands it will be very easy to work with Linux and to install and configure new software.

Having a Linux server is a great upgrade to your home network. This server will be your reliable storage for large peer-to-peer files, web server for website development or a computer to play with. And remember, sooner or later you will encounter a problem. Something will not work or you will not know how to change some setting. All you have to do is to search for the answer on the web. Web pages offer a giant encyclopedia on Linux.

The author is a big Linux fan and all his websites were developed on a home Linux server. One such project is http://hydronicfloorheating.org/ which offers some basic information on Hydronic Floor Heating.

Tags: ,

Know Your Tech-Speak – Linux Dedicated Servers
By James Koh

There is something to be said about using either shared web hosting solutions or those that are dedicated to a single platform, either Windows based or Linux based. These two represent the most popular solutions on the internet for consumers and businesses to get online and distinct themselves on the information super highway. The former is more popular because of the fact that it is shared, which means within the pipeline, there are a few users, and in some cases, a few hundred and even a few thousand users sharing the server bandwidth.

This is great when you are a simple consumer using the server for more leisure and casual reasons but when you are using the internet as a platform to extend your business, then you need to get a dedicated server. While more expensive, it is a dedicated server with customisable host names and more bandwidth to support your needs. This article will peek a little at the Linux dedicated server and tell you why they are great solutions for your business and in some cases, even personal needs. The reason why shared web hosting is so much more cost effective is because of the reason above – they use one single server in a location that can host tens of thousands of websites all over the world.

Because of volume, the cost goes down; but there are detriments to this, which include things like a shared bandwidth, meaning you will experience slowdowns and technical problems that are universal. With a dedicated Linux server, you will be guaranteed a larger bandwidth and your own personal space online. This is because your website is being handled by one single dedicated server, and because of the resource focus to keeping your website running, there is a higher level of reliability when compared to using shared hosting.

The equipment behind these servers are usually the best in the business, with high end servers being a feature common to Linux dedicated servers, so it is always a good idea to in that direction. You do not want to be caught in a position where you a riding on the back of a technologically inferior server that cannot deliver the power and speed that your website and business demands. With Linux servers, you know you are getting pre-configures and cutting edge equipment. The network connections are usually way above the consumer T3 connections; with gigabyte level bandwidths not uncommon with some Linux servers.

They will also provide you with custom software and a team to support the server, in case of any difficulties and issues with your web site. If you are looking for performance and piece of mind, the general advice is to go for a Windows based or Linux dedicated server. With so many issues already reported with shared servers, you know that this is the direction you need to provide your website with the resources that it needs. So know your tech speak and be aware of emerging technologies in web hosting, and make the right choice.

Vodien Internet Solutions provides all-in-one web hosting packages. Find out more details about their Singapore web hosting packages at their website.

Tags: , , ,

Linux Vs Windows – Which One to Pick?
By Roberto Sedycias

not-butter-210x130Choosing the appropriate operating system is based on the server`s function. Linux is powerful and has a versatile operating system while Windows is well-known for its easy to use operating system and versatility. Deciding the right server was certainly a trial as a decade ago, Microsoft`s Windows NT and Novell`s NetWare4 were prominently in use, but today NetWare has totally disappeared and the Linux version is found to be a good choice. Both Windows and Linux come in server and desktop editions.

Maintenance and security are one of the significant areas to comprehend the actual differences between the operating systems. Linux are commonly referred to as distributions, also known as `distros`, and are released around the same time frame using the same kernel version (operating system). Linux needs careful consideration of hardware drivers as the hardware newly released should be appropriate and this includes the motherboard as well. Linux installation should be done by people who have proper knowledge to run the operating system and its applications. Linux is stable and more secure than Windows.

290px-Windows_Server_2008_R2_RTMOn the other hand, Windows offers easy installation and runs even in default modes, besides it includes a series of drivers regardless of the hardware type and has the extensive variety of software. However it suffers with frequent security problems demanding critical patches involving rebooting. Moreover it is expensive right from the purchase price to the applications, besides ongoing maintenance is a must to keep it updated and stable.

The comparison of Linux vs. Window includes other considerations such as the price, specialized options and support. Linux has server oriented versions available with vendors and some are offered with 24/7 paid support. There are less expensive distribution versions obtainable at Mepis, Centos and Xandros and others, which are offered at a very low cost to get started, while Debian, Slackware, Mint, Mandriva, Fedora of Red Hat and Ubuntu are all free versions.

On the other side Microsoft Windows server is regular with 32 and 64 bit versions with specialized options such that it is ideal for small as well as medium sized businesses. However, the biggest hit is that Windows is buoyed up by a multi billion dollar company and is compatible with the majority of software, besides it is very easy in using and understanding that even an average user can make the best of it. Windows pricing varies dramatically based on the numbers purchased and on the yearly maintenance agreement or the licensing plan.

The significant difference in Linux version does not speak about the software quality or the drivers` availability, but the support offered. Depending upon the Linux distribution package, the user may get a quick and 24/7 paid support, and this should well suit any corporate environment. Purchasing the operating system and hardware together ensures the support for installed hardware, else it may be required researching to ensure the motherboard, network adapter, chipset and others are supported by the Linux version. The other non-Linux options include OpenSolaris and many variants of Berkley Software Distribution.

Roberto Sedycias works as IT consultant for Polomercantil

Tags: , ,

Recycle Old Desktop PCS With Linux
By Alex Colcernian

As more and more computers find their way to the garbage, we generate e-waste. Everyday the e-waste heap grows, and many of the computers within can be re-purposed and recycled. Re-purposing and recycling computers is extremely beneficial to our environment and light on the check book. After examining why computers typically fail, you will learn how you old desktop PC can become a “new” thin client, allowing you to work with documents, browse the web, and more.

Why Do Desktop PC’s “Fail”?

It is incredibly rare for all of the components in a computer to go bad. Typically, one component tends to be the main culprit… the hard drive. Until the more recent SSDs (Solid-State-Disks), all hard drives spin. The movement within the drive creates the opportunity for damage one way or another. As the hard drive gets older, bad sectors start forming, and eventually the hard drive is considered useless. Damaging the CPU, RAM, Motherboard, or Video Card is less likely compared to the hard drive. Just be sure your fans are doing their job… cooling.

Why Linux Recycles Desktop PC’s

After your hard drive fails, do yourself a favor…

  1. Unplug it
  2. Remove it
  3. Dispose of Properly
  4. Keep Reading

Sure you can put a new hard drive in and keep using it, but what if there was something better? There is…

As long as your Network Card (NIC) has the capability of Network Booting using the PXE protocol, you can turn that used computer into a lively, fully functioning “Thin Client”.

Use the CPU, RAM, Sound and Video Cards, and forget the source of problems – the hard drive.

With Linux Terminal Server Project (LTSP), you can load your desktop operating system and applications over your LAN. With a server and a switch, you are well on your way to a license free thin client environment. LTSP has allowed people all over the world the ability to deploy computers that may have found their way to a landfill. Not only are they recycled desktop PCs, but they become centrally managed providing benefits for the IT department. Brand new thin clients are really nice, but if you have the opportunity you should be in the practice of recycling older computer hardware. When acceptable hardware exists, re-purpose it, recycle it, and put it to good use.

Recommended Specifications – Recycling Desktop PC to Thin Client

  • CPU: 800MHz +
  • RAM: 256MB +
  • Video: 64MB +
  • NIC: 10/100 or Better (Must Network Boot via PXE)

Sound Interesting? Get in touch with the open source community. You can join us in the IRC channel #LTSP @ irc.freenode.net. We will point you in the direction of some documentation and a very friendly open source community always jumping at the opportunity to help others.

Alex Colcernian is the Director of Marketing and Sales at DisklessWorkstations.com. DisklessWorkstations.com founded alongside the Linux Terminal Server Project (LTSP) in 1999, provides thin client hardware and solutions. DisklessWorkstations.com is the global leader in LTSP deployments, serving businesses, government, non-profits, and schools.

Tags: ,

Comparisons of Linux and Windows Web Hosting
By Shellaine Enfesta

There are a lot of people trying to compare windows web hosting to Linux based webhosting. There are many similarities as well as the benefits and the advantages of both. While there are so many similarities and advantage, it is those little specifics that count the most. It needs to be broken down in order to know the many similarities and advantages.

290px-Windows_Server_2008_R2_RTMCurrent versions of Windows Server also support PHP. Most Windows hosting packages today are based on either Microsoft Windows Server 2003 or 2008 operating systems. Although Linux is dominant in the hosting arena, Windows is becoming more common and now stands firm as a solid number-two option. For the rest of us, however, most of whom can barely spell HTML, never mind use it, building a website is something either best left to the aforementioned techno-geeks, or to Windows and Microsoft. If you’re looking for an inexpensive way to host your personal site, blog or small business web site, than look no further.

For example, all components from IIS (Internet Information Services) to the SQL Server database system are designed to support one another. Two of the most essential components you definitely need to consider are storage and bandwidth. Our guaranteed web hosting providers offer many years of experience in managing your website or shopping cart or will build and support an entire on-line store.

NET, both of which are web application frameworks that can help you creates a dynamic, feature-rich website. Plesk is a web based interface to your Windows web hosting account that allows you to create e-mail addresses and mailboxes, view your web site traffic statistics, set permissions on your HTML, ASP, and ASP. Outsourcing enables a company to reduce its TCO by freeing assets, such as cash that is allocated to capital expenditures and the expense of specially-trained staff, which can account for anywhere from 22 percent to 47 percent of the total budget for the Web site.

KNOPPIX_booting300widthLinux web hosting in the beginning, the system was primarily but sparingly used by diehard fans and experienced users due to its complexity. Here are the other advantages of choosing Linux web hosting: The internet itself is based on interconnected networking computers, something that comes naturally for Linux.

Both operating systems have pros and cons to consider when deciding which to use for hosting. Commercial support is offered via a number of vendors. Linux web hosting is not a complicated job like the way it is portrayed by pundits who compare it with the user-friendly interface of Windows.

The bottom line when you compare these two main web hosting systems, it all depends on your business or personal preference. All you need to do is to compare the advantages and disadvantages and then make the informed decision on which web hosting systems is more of your preferences and easier to undertake.

Get More Tips and Info On Windows Web Site Hosting and Windows Hosting Reseller From A Cheap Web Hosting Before Buying Your Hosting Package compare the Hosting Plans and Decide.

Tags: , , , , , ,

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: , , , ,
« Previous posts Next posts » Back to top