Obtaining SSH (Secure Shell) Access to any PHP or ASP enabled web server

 

Written By:

R Troiano

Richie086@gmail.com

   

 

Name:    _______________

Date:    _______________

Teacher: _______________

Class:   _______________

 

 

 

Vocabulary

 

*nix

Used to describe any UNIX based operating system.  This includes Red Hat, SuSe, Debian, FreeBSD or any OS based on UNIX.  The main difference between how UNIX operates and how other OSes operate is how access to data is administered and the types of file systems. 

 

ASP

ASP (Active Server Pages) is a programming framework built on the common language runtime that can be used on a server to build powerful Web applications.  ASP was developed by Microsoft to add scripting functionality to web sites.  Functionally, ASP provides the same things that PHP (see below) does. Visit http://www.asp.net/ for more information.

 

HTML

HTML or Hyper Text Markup Language is the standard for publishing hypertext on the World Wide Web. It is a non-proprietary format based upon SGML, and can be created and processed by a wide range of tools, from simple plain text editors - you type it in from scratch- to sophisticated  authoring tools. HTML uses tags such as <h1> and </h1> to structure text into headings, paragraphs, lists, hypertext links etc.  Visit http://www.w3.org/MarkUp/ for more information.

 

OpenSSH 

OpenSSH is a open source implementation of the SSH protocol that can be installed on any UNIX variant, as well as Microsoft Windows 98, NT, 2K, 2K3, XP.  Visit http://www.openssh.org for more information.

 

PHP

PHP is a widely used, general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.  Most web servers have some sort of PHP functionality.  Visit http://www.php.net for more information. 

 

SSH

SSH or Secure Shell is a protocol that allows encrypted communications between two (usually *nix) hosts.  The SSH protocol runs on port 22.  SSH is typically used to remotely administer computers running UNIX or Linux machines.  Visit http://www.ssh.com/ for more information.

 

 

 

 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
Requirements

·          PHP v4.X  

Available for windows and linux from http://www.php.net

·          A web server

           

 Linux                      Apache   http://www.apache.org

                              Zeus        http://www.zeus.com/products/zws/

 Windows                 Apache   http://www.apache.org

                              ISS         comes with any windows server platform

 

If anyone in the class owns a web domain with PHP or ASP support it will save you a lot of time by using that web site rather than having to install windows or linux and actually get a website up and going.  If you do need to set your own web server, you are on your own as far as the details of installing and configuring it.  The scope of information I would need to provide would exceed 50 pages and has already been written and can be found on the internet quite easily.   

You should, at this point in your education, already know how to install and configure basic servers or at least know how to use a search engine to figure out how to do it.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Web Hosting -  A Quick Overview

 

Before we get too far into this lab, I need to explain the directory structure used in most websites being run by apache.  I must admit, I am not too familiar with Microsoft’s IIS (Internet Information Server) and how web sites are structured that use IIS.  Most professional web hosting companies offer some sort of Microsoft OS web host enviroment, but the fact is that each server they have IIS or any Microsoft product installed on, it costs the company more money.  Linux based web hosts on the other hand don’t usually have to pay a dime for use of  open source software.  The end result is the hosting company can put more resources into other things such as more bandwidth, storage, advertising, etc.   

 

I personally have been administering web domains of all sorts for a number of years, and 90% of the time your going to be dealing with some sort of *nix host, which in turn will have this type of directory structure. 

 

drwxr-xr-x    2 root         2.2k Feb  4 13:11 bin/

drwxr-xr-x    2 root         1.1k Nov 14  2004 boot/

drwxr-xr-x   11 root          33k Jul  3 06:47 dev/

drwxr-xr-x  146 root          11k Jun 27 07:19 etc/

drwxrwsr-x    2 root           48 Feb  8  2002 home/

drwxr-xr-x    7 root         3.4k Jan 12 13:58 lib/

drwxr-xr-x    6 root          144 Oct 22  2004 mnt/

drwxr-xr-x    2 root           48 Apr  8  2003 opt/

dr-xr-xr-x  287 root            0 Dec 16  2004 proc/

drwxr-xr-x    2 root         4.9k Jan 12 13:58 sbin/

drwxr-xr-x   62 root         1.5k Jun 17 11:48 serv/

drwxrwxrwt   18 root         4.0k Jul  5 01:41 tmp/

drwxr-xr-x   14 root          368 Jan 21  2004 usr/

drwxr-xr-x   20 root          480 Nov  6  2003 var/

 

 

This is the root ( / ) directory of a normal *nix file system.

 

By default, apache likes to serve its web sites in a directory called /var/www/html 

If you have access to a Linux box (I hope you do!) and your not too familiar with apache or Linux, go and check it out!!!!  It’s simple, just type

 

cd /var/www/html

     

I would like to stress the fact that Open Source does not necessarily mean free or cheap or inferior software.  Many companies such as Cygnus, Red Hat and VA Linux have shown that it is not hard to make money from Open Source software.  Usually, the reason software gets written is because someone needs some code for whatever reason.   So projects such as apache spring up, because someone needed a web server.