Specifications

Important: Removing a host key from the known_hosts le bypasses a security
mechanism that would help you avoid imposters and man-in-the-middle attacks.
Before you delete a host key from the known_hosts le, be sure you understand why
the key on the remote computer has changed.
Controlling Access to SSH Service
You can use Server Admin to control which users can open a command-line
connection using the ssh tool in Terminal. Users with administrator privileges can
always open a connection using SSH.
For information about controlling access to the SSH service, see Open Directory
Administration.
Connecting to a Remote Computer Using SSH
Use the ssh tool to create a secure shell connection to a remote computer.
To access a remote computer using ssh:
1 Open Terminal.
2 Log in to the remote computer by entering:
$ ssh -l username server
Replace username with the name of an administrator user on the remote computer.
Replace server with the name or IP address of the remote computer. For example:
$ ssh -l mariah 10.0.1.2
If this is the rst time you’re connecting to the remote computer, you’re prompted to
continue connecting after the remote computers RSA ngerprint appears.
Enter yes.
3 When prompted, enter the users password for the remote computer.
The command prompt changes to show that you’re connected to the remote
computer. In the previous example, the prompt might look like this:
10.0.1.2:~ mariah$
4 To send a command to the remote computer, enter the command.
5 To close the remote connection, enter logout.
You can authenticate and send a command using a single line, by appending the
command to the basic ssh tool. For example, to delete a le you could enter:
$ ssh -l mariah server1.example.com rm /Users/mariah/Documents/report
or
$ ssh -l mariah@server1.example.com “rm /Users/mariah/Documents/report”
You’re prompted for the users password.
32 Chapter 4 Connecting to Remote Computers