Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to connect to a Mac server from my MacBook using If I open Finder, I can see it in my "SHARED" list. I can "connect as" an authenticated user and all that.

But how do I connect to the same machine from the Terminal? I don't know its IP address, just know it's name.


share|improve this question
up vote 6 down vote accepted

ssh computer_name

You'll need to turn on Remote Login in the Sharing Prefs Pane of the computer you want to connect to.

share|improve this answer

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 remoteuser@remoteBonjourName.local, 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.

share|improve this answer
  1. Select Go > Applications then Utilities > Terminal.
  2. 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
  3. Under Service, select Secure Shell (ssh).
  4. 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., 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.
  5. Type your andrew UserID in the User text box.
  6. Select SSH Protocol 2 from the drop-down list. (selecting "SSH Automatic" from this list will also work.)
  7. 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
  8. Click Connect.

Hope that will help you

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .