Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to connect to a Mac server from my MacBook using Terminal.app. 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.

Thanks

share|improve this question
add comment

3 Answers

up vote 5 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
add comment

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
add comment
  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., 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.
  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 userid@unix.andrew.cmu.edu.
  8. Click Connect.

Hope that will help you

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.