Using the OpenSSH Server
Before you can use sshd on Mac OS X, you’ll need to enable the server and possibly open up the Mac’s firewall. In addition, you’ll want to know about some configuration differences as compared to most other OpenSSH installations.
15.2.1 Enabling the Server
SSH server startup is controlled from the Sharing pane in System Preferences, under Services, as in Figure 15-1. To enable sshd, select Remote Login and click the Start button.
Figure 15-1. Enabling the SSH server in System Preferences
15.2.2 Opening the Firewall
By default, the Mac OS X personal firewall will block SSH connections from the outside world. If you have this firewall enabled, you must manually permit SSH traffic through it. This is done from the Sharing pane in System Preferences, under Firewall, as in Figure 15-2.
Figure 15-2. Opening a firewall hole for SSH in System Preferences
15.2.3 Control by xinetd
In most Unix-like operating systems, the OpenSSH server runs as a daemon, listening for SSH connections. On Mac OS X, however, sshd is controlled by the super-server daemon, xinetd. [5.3.3.2] Whenever an SSH client attempts to contact sshd on TCP port 22, xinetd notices the attempt and invokes a single instance of sshd (specifically, sshd -i) to serve that connection.
The xinetd configuration file for ...
Get SSH, The Secure Shell: The Definitive Guide, 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.