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 have two MacBook Pros on my home network. I have followed the advice in the below question to be able to SSH into them:

How do you run a SSH server on Mac OS X?

However, how would I issue the command to SSH into them from:

  1. Within my home wireless network?
  2. From a work computer outside of my home network?

My home network is using a Linksys WRT54G router and both computers are connected wirelessly.

share|improve this question
just a shot in the dark but check out – Robert S Ciaccio Sep 29 '10 at 18:04

For computers on your local network you use the private IP address e.g.

$ ssh

To connect from outside your network then you need the IP address of your router and you need to make sure that you have port 22 routed to the appropriate machine on your local network, and then you can just do:

$ ssh ww.xx.yy.zz

where ww.xx.yy.zz is your external (public) IP address.

share|improve this answer will show you your external IP – ridogi Jul 26 '10 at 18:37
So from outside, I wont be able to choose which machine I ssh into? – SuperUser12 Jul 26 '10 at 18:42
You will need to specify in your router settings which local IP address receives incoming connections on port 22. This is because you only have one external IP address. If you need to access more than one machine you'll have to use port mapping e.g. port 22 ->, port 10022 ->, port 10122 ->, etc. – Paul R Jul 26 '10 at 18:55
On your LAN, you can also use Bonjour names, like $ ssh user@MyMacBook.local If you want to get classy, look into to assign a domain name to your router (it's free) and check out Tomato Router Firmware (google that) to have your router automatically update your dns server if your dynamic IP ever changes. With that firmware, you can also designate certain ethernet hardware addresses to be assigned static IPs (through DHCP) on your network, so you don't have to reforward when the LAN IP would otherwise change. – NReilingh Jul 26 '10 at 20:51

You must log in to answer this question.

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