Hardware Reference
In-Depth Information
Although this is the most direct way to work with PHP,
some people prefer to work more indirectly, by writing text
files on their local computers and uploading them to the
remote computer. Depending on how restrictive your web
hosting service is, this may be your only option (however,
there are many inexpensive hosting companies that offer
full command-line access). Even if you prefer to work this
way, there are times in this topic when the command line
is your only option, so it's worth getting to know a little bit
about it now.
On Windows computers, there are a few remote access
programs available, but the one that you'll use here is
called PuTTY. You can download it from www.puttyssh.org .
Download the Windows-style installer and run it. On Mac
OS X and Linux, you can use OpenSSH, which is included
with both operating systems, and can be run in the
Terminal program with the command ssh .
Before you can run OpenSSH, you'll need to launch a
terminal emulation program, which gives you access to
your Linux or Mac OS X command line. On Mac OS X,
the program is called Terminal, and you can find it in the
Utilities subdirectory of the Applications directory. On Linux,
look for a program called xterm, rxvt, Terminal, or Konsole.
Figure 1-3
The main PuTTY window.
Making the SSH Connection
NOTE: ssh is a more modern cousin of a longtime Unix remote-
access program called telnet . ssh is more secure; it scrambles
all data sent from one computer to another before sending it, so
it can't be snooped on en route. telnet sends all data from one
computer to another with no encryption. You should use ssh to
connect from one machine to another whenever you can. Where
telnet is used in this topic, it's because it's the only tool that will
do what's needed for the examples in question. Think of telnet as
an old friend: maybe he's not the coolest guy on the block, maybe
he's a bit of a gossip, but he's stood by you forever, and you know
you can trust him to do the job when everyone else lets you down.
X
Mac OS X and Linux
Open your terminal program. These Terminal
applications give you a plain-text window with a
greeting like this:
Last login: Wed Feb 22 07:20:34 on ttyp1
ComputerName:~ username$
Type ssh username@myhost.com at the command
line to connect to your web host. Replace username
and myhost.com with your username and host
address.
Windows
On Windows, you'll need to start up PuTTY (see Figure
1-3). To get started, type myhost.com (your web
host's name) in the Host Name field, choose the SSH
protocol, and then click Open.
The computer will try to connect to the remote host,
asking for your password when it connects. Type it
(you won't see what you type), followed by the Enter key.
 
Search WWH ::




Custom Search