O'Reilly logo

Unix Power Tools, 3rd Edition by Mike Loukides, Tim O'Reilly, Shelley Powers, Jerry Peek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 51. SSH

Enabling Remote Access on Mac OS X

Enabling SSH ( Section 46.6) on Mac OS X is fairly simple. Access the System Preferences from the Apple menu and double-click the Sharing folder. When this opens, click the Application tab and check the box labeled “Allow remote login.” Quit System Preferences, and the machine is now configured for SSH access, remotely.

To enable telnet , rsh, or rlogin (if you’re sure you want these processes), open the Terminal window and edit the /etc/inetd.conf file (using sudo (Section 49.11) if you’re logged in as a member of the administration group (Section 49.7) or login as root). Remove the pound sign (#) from in front of whatever remote service you want to enable:

#ftp     stream   tcp     nowait     root    /usr/libexec/tcpd            ftpd -L

You’ll need to restart the server, or you can restart inetd (Section 46.5) by typing:

kill -HUP `cat /var/run/inetd.pid`

— SP

Protecting Access Through SSH

The problems associated with telnet and ftp, such as passing plain text passwords, can be overcome through the use of SSH (Section 46.6). SSH encrypts any communication between the client and the server, preventing anyone from capturing the information in transit. You should always use SSH to connect to your system remotely.

SSH works by authenticating the client using one of several authentication schemes, including a simple authentication that looks for a client machine within /etc/hosts.equiv. If the user on the local machine matches the username on the remote machine, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required