Connect to another Mac via Terminal?
Solution 1:
ssh computer_name
You'll need to turn on Remote Login in the Sharing Prefs Pane of the computer you want to connect to.
Solution 2:
First, you need to have remote command-line login (with the SSH protocol) enabled on other computer -- open System Preferences -> Sharing, and enable Remote Login (also, make sure the Allow access for: option enables the account you want to log into).
To make the connection, run Terminal, and use the command ssh [email protected]
, where remoteBonjourName.local is the computer name of the other machine with most punctuation removed, spaces converted to "-", and ".local" added to the end (check its Sharing prefs, right under the Computer Name)
Alternately, you can use Terminal's New Remote Connection option (under the Shell menu), select Secure Shell (SSH) from the Service list, and it should show all Macs running SSH on the right side. Select the one you want to connect to, enter the user you want to log in as in the User field, and click Connect.
Solution 3:
- Select Go > Applications then Utilities > Terminal.
- Do one of the following: • Mac OS X 10.4 - select File > Connect to Server. • Mac OS X 10.5 - select Shell > New Remote Connection
- Under Service, select Secure Shell (ssh).
- Under Server click the plus sign. You are prompted to "Enter the name or IP address of a server...". Type the name or address for the host server that you want to access (e.g., unix.andrew.cmu.edu). Click OK. Note: This server address will now appear in the Server list. The next time you wish to connect, you can select it from the list.
- Type your andrew UserID in the User text box.
- Select SSH Protocol 2 from the drop-down list. (selecting "SSH Automatic" from this list will also work.)
- Select the server address from the drop-down list. The server address will appear as ssh-2 userid@host server address Where userid is your Andrew userID and host server address is the address of the host server you are trying to connect to. In our example, the server address appears as: ssh-2 [email protected].
- Click Connect.
Hope that will help you