Remote Logins

Through the Terminal application, you can log into other (usually Unix or Mac OS X) machines over a network and run command-line programs on them through a shell, just as Terminal lets you normally do with your own machine.

Programs you can use for this include telnet and ssh. You can find references to both in Chapter 28, but the general way to run them is to simply use telnet (or ssh) host. If host accepts the connection, you’ll be prompted for a password. Once authenticated, the remote machine greets you with a shell prompt of its own. In the following example, the user chris is using ssh to connect from his local machine (named MyPB) to another Mac OS X machine on his local network (named natsu):

MyPB:~ chris$ ssh natsu
chris@natsu's password: 
Last login: Sat Feb 28 10:08:14 2004 from 192.168.1.9
Welcome to Darwin!
[natsu:~] chris%

Note the different prompts, due to different shell configurations this user has on the two machines. Note also that configuring one’s shell to display the current hostname within one’s prompt can be a good idea, because it acts as a constant reminder as to which machine you’re working with!

If your username on the remote machine is not the same as the one you use locally, use the ssh command’s ssh username @ host or ssh -l host syntax.

Tip

If you have X Windows installed on your Mac, you can run other Unix machines’ GUI software on your machine, as described in Chapter 26. You can also use VNC to log into other Mac OS X machines and enjoy ...

Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.