05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

368<br />

CHAPTER 21 WORKING WITH REMOTE SERVERS AND NETWORKS<br />

Conspicuously absent as available protocol declarations in the Connect to Server window<br />

are sftp, the Secure Shell File Transfer Protocol; svn, the Subversion file transfer protocol<br />

(although Subversion can be transacted over other protocols, such as HTTP); and file, as used<br />

in standard file URLs. The absence of file URLs is notable not because they have much meaning<br />

in a dialog intended for connecting to servers but because they are used extensively throughout<br />

the system. Using them in the Connect to Server window simply returns an error.<br />

Connecting in Darwin<br />

Although using a computer’s graphical interface via screen sharing is relatively new, the concept<br />

of using one computer to log in to and control another computer remotely is anything but. UNIX<br />

is, by its very nature, a remotely controllable operating system, and old-fashioned shell-to-shell<br />

networking is very much alive in Terminal, as shown in Figure 21-3.<br />

Figure 21-3. Remote computing by Secure Shell in Terminal<br />

To connect to another machine, open Terminal from /Applications/Utilities. From the<br />

command line, invoke ssh with the username and address of the machine you want to connect to,<br />

separated by the “at” sign. For example, to connect to a machine at the local IP address 10.0.1.5<br />

with the username booksystem, you would type this:<br />

ssh booksystem@10.0.1.5<br />

NOTE You don’t have to use a local IP address or an IP address at all. Anything that can be<br />

resolved on the Internet is valid, including standard and local domain names.<br />

If you are connecting to a machine for the first time, you will be asked whether it is safe to<br />

proceed. Confirm this by typing yes. Unlike most UNIX programs, you have to type the entire<br />

word. You will then be prompted for a password and then, assuming you can authenticate properly,<br />

presented with a welcome message and the command prompt.<br />

From this prompt you can create, delete, and alter files and folders, as well as list, run, and<br />

kill processes. You can even launch new shells and Secure Shell into other servers. It’s the same as<br />

if you were sitting at the remote machine typing into a Terminal window.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!