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.

This can have unexpected consequences. For example, any DNS resolution will be in terms<br />

of the remote machine. If you have domains listed as default, local hosts, or discrepancies in the<br />

closest name server’s routing table, the remote machine might behave differently than would<br />

your local host.<br />

To log out of the remote server, type exit. This is the same as exiting any shell, so bear in<br />

mind that if you’ve launched a new shell from within the Secure Shell, typing exit will not log<br />

you out. Fortunately, when you log out of a Secure Shell session, Secure Shell will let you know<br />

the connection is closed. If you don’t get that confirmation, assume you are still logged in.<br />

Remote login via Secure Shell can be enabled from System Preferences, as discussed in the<br />

“Sharing” section later in this chapter.<br />

NOTE Secure Shell replaces the older Telnet application. Both programs accomplish the same<br />

thing, but ssh uses encryption to ensure an attacker cannot view your data in transit. Most<br />

machines do not allow insecure access, but Telnet remains in the UNIX toolbox for backward<br />

compatibility.<br />

Darwin also includes an ftp program for using the File Transfer Protocol to move files<br />

between machines. As opposed to shell access, which allows for all manner of shenanigans, FTP<br />

access is much more limited, restricting user privileges to basic file operations.<br />

To use FTP from the command line, simply type ftp. Unlike Secure Shell, FTP can be<br />

invoked without actually opening a connection. To connect to a remote machine, type open, and<br />

then, when prompted, enter the address of the machine, your username, and your password.<br />

Unlike the Finder’s Connect to Server menu, Darwin does not have an ftps command, but it<br />

does have an sftp command, which works just like the regular ftp command. However, although<br />

opening a connection and supplying your username at invocation time are optional in ftp, they<br />

are required in sftp.<br />

sftp booksystem@10.0.1.5<br />

Enter your password when prompted, and then proceed as normal.<br />

Whatever the advantage to using sftp, moving files back and forth in the terminal is almost<br />

too complicated to make it worthwhile, but if you really want to know, type man ftp or man sftp<br />

in the terminal to read all about it. A much better idea would be to use a dedicated FTP client.<br />

Third-Party Solutions<br />

The Finder was designed to be a file browser, so it’s a great way to take advantage of remote file<br />

protocols, such as AFP, SMB, and WebDAV. However, just as you wouldn’t use the Finder to surf<br />

the Web, it’s also ill-suited for dealing with the peculiar needs of FTP and related protocols.<br />

Instead, it’s best to turn to third-party solutions.<br />

Transmit<br />

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

I’ve used a lot of FTP clients on a lot of different platforms, but one application stands head-andshoulders<br />

above any other: Transmit (www.panic.com/transmit/). This award-winning application<br />

is available only on the <strong>Mac</strong> and was written by Panic, a Portland-based, <strong>Mac</strong>-only software<br />

company held in the highest esteem by developers and users alike.<br />

As shown in Figure 21-4, Transmit has a simple, native drag-and-drop interface that belies<br />

its power. Under the hood Transmit has a robust file transfer engine that works with all manner<br />

of protocols, including FTP, FTPS, SFTP, WebDAV over HTTP and HTTPS, and Amazon S3. It<br />

also deals with such vagaries as proxies and passive mode.

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

Saved successfully!

Ooh no, something went wrong!