While messing around with a client’s laptop this afternoon I needed to enable SSH and decided to not only do it via the CLI but locate the method to do it via the Mac OSX Desktop as well. Enabling SSH via the OSX GUI can be done via the Sharing sub section of System Preferences by checking one box. Below is information on how to launch OSX System Preferences, navigate to enabling services in Sharing, and then enabling SSH.
Enable SSH Using Mac OSX Desktop GUI:
- Open System Preferences: First open the Mac OSX System Preferences by clicking on the Apple icon in the top navigation bar as shown in the below image.
Once you click System Preferences from the Apple Menu the below System Preferences configuration window will display.
- OSX Sharing: Now with the System Preferences configuration window open above click on Sharing underneath the Internet & Networking sub section to open the Sharing configuration window as displayed below.
- Enable SSH: Now click the check box next to Remote Login as shown below to enable SSH on the Mac OSX computer. This should also enable a pass through in the firewall if you have the OSX firewall turned on.
As you can see at the bottom of he Sharing configuration window after enabling Remote Login (SSHD) it will display the IP address and username that users can login to the computer with on port 22.
- Test SSH: Now from a different computer attempt to connect to the Mac OSX desktop or laptop using SSH on port 22. If there is not a password set for the user then you should read this articl to enable accounts without a password to temporarily login.
SSHD is now enabled and running on your computer and you should be able to login on SSH port 22 and use the Mac OSX command line interface as if you had opened a terminal window on the initial Mac OSX computer.