User`s guide

Using Command-Line Tools 29
Using the Secure Shell (SSH) Command
Mac OS X Server supports Secure Shell (SSH), so an administrator can log in to a remote
server and send secure, encrypted commands over a network. With SSH turned on, you can
use the Terminal application to open a SSH session and use the command-line tools to
configure your remote server. You can also connect a terminal to Xserve through the serial
port and log in using SSH. (For information about this, see “Connecting Through the Serial
Port” on page 79.)
SSH is turned on by default when you run Mac OS X Server Assistant. You can also turn SSH
on or off for a client computer in the Sharing preferences. Click the Application tab and
check “Allow remote login.”
Open a SSH Session
To use command-line tools, you must first open a SSH session and log in to the server you
want to configure.
1 Open Terminal on your admin computer.
2 At the prompt, type ssh, then a hyphen, the flag “l” (lower case L, for “login”) followed by the
user name of the administrator of the remote server, and the server’s IP address or host
name. (You can find this information on the worksheet you filled out during server setup.)
Press Return when you’re finished.
For example, if the admin name is jsmith and the server’s IP address is 192.168.100.100, you
would type:
ssh -l jsmith 192.168.100.100
If you’re not sure of the administrator name for the server, you can also enter the
administrator information this way:
ssh admin@192.168.100.100
3 At the prompt, type the administrator password and press Return.
Note: If you don’t enter an administrator name (or
admin), SSH will use the user name of
the person currently logged in to the admin computer. If this user doesn’t have administrator
access to the server, you must enter the appropriate administrator name.
If everything is entered correctly, the prompt displays the hostname of the remote server.
For example:
[192.168.100.100:~] jsmith%
Note: If you started the server up from a CD and logged in as root, you will only see a
number sign (#) instead of the hostname of the remote server.
Important If you turn SSH off, you can’t administer the server remotely. To turn SSH back
on, you must do so locally on the server.
LL2133.book Page 29 Friday, May 24, 2002 11:17 AM