Mac OS X Unleashed

Mac OS X Unleashed

By John Ray and William C. Ray

Starting SSH in OS X

If you are running the first non-public beta release of OS X, SSH is not included. Run Software Update, which is located in System Preferences, to get the update (patch) that includes SSH. The first official release that contains SSH is OS X 10.0.1. Software Update places your SSH server, sshd, in /usr/sbin and your SSH tools in /usr/bin.

After you have SSH installed, you are ready to turn on your SSH service. Just go to the Sharing pane in System Preferences and check the Allow Remote Login option, as shown in Figure 26.1. The first time you do this, you might experience a delay.

26fig01.jpg

Figure 26.1 Check the Allow Remote Login box in the Sharing pane to start the SSH service.

One of the main activities that checking this box performs is updating your /etc/hostconfig file, shown following this paragraph, to indicate that the SSH service should be turned on. Note that SSHSERVER is set to YES. If you were to turn off the service, this would revert to NO. Because this file has the comment that it is maintained by the system control panels, it might not be wise to edit this file directly yourself. However, it is interesting to be able to occasionally see some of what the operating system is doing for you behind the scenes.

##
# /etc/hostconfig
##
# This file is maintained by the system control panels
##
# Network configuration
HOSTNAME=-AUTOMATIC-
ROUTER=-AUTOMATIC-

# Services
AFPSERVER=-YES-
APPLETALK=en0
AUTHSERVER=-NO-
AUTOCONFIG=-YES-
AUTODISKMOUNT=-REMOVABLE-
AUTOMOUNT=-YES-
CONFIGSERVER=-NO-
IPFORWARDING=-NO-
MAILSERVER=-NO-
MANAGEMENTSERVER=-NO-
NETBOOTSERVER=-NO-
NISDOMAIN=-NO-
TIMESYNC=-YES-
QTSSERVER=-NO-
SSHSERVER=-YES-
WEBSERVER=-NO-
APPLETALK_HOSTNAME=creampuf

If you check your process listing for ssh, you will now see an sshd process:

[localhost:~] joray% ps aux | grep ssh

     root    614   0.0  0.0     1476    340  ??  Ss     0:00.50 /usr/sbin/sshd
     joray   676   0.0  0.0     1384    300 std  S+     0:00.01 grep ssh

For the 10.0.1 update, what you have just turned on is the open source package SSH package, OpenSSH -2.30p1. It is SSH1- and SSH2-capable. Because it supports both protocols, a connection from either type of SSH client works.

Share ThisShare This

Informit Network