What Problem are We Trying to Solve?
If you have a machine that’s got a bad monitor or locked up in some way that you can’t directly control it, you might have some success if you could connect in via the Terminal. In these few quick steps we’ll show you how to set up the target Mac so that you can connect to it over the network using just the Terminal.
Set Up the Target Machine You Want to Control
Open System Preferences and click on Sharing.
Click the Lock to Make Changes
Enter your administrator credentials in the pop up window.
Check the box for remote login. If you want to restrict remote login to a subset of the users of the machine, click on the radio button for Only these users, and then click the Plus button below that window.
Add Users to the Access List
In this example I’ll add allison and then click Select.
Click the Lock to Prevent Further Changes
- Click the lock to prevent changes
- Note at the top it says the name at which your computer can be accessed – write this down! In my case, the name is Core-i7-4.local and be sure to note that this name is case sensitive
On Another Mac Connect to the First Mac
Open a Terminal and type in ssh followed by the name you recorded for the target Mac.
You will be prompted for your password. In this case I only authorized the account allison, so there’s only one option here.
Note that the prompt has changed to Core-i7-4 so we know I’m logged into the target Mac.
From here you can list files, copy files, move files, whatever you can do in the Terminal if you’d been sitting at the target Mac.