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

This question already has an answer here:

I have set up simple ssh server by using openssh on my Ubuntu.

I tried to ssh it from my Mac, which successful. But my mac is in the same subnet, which behind same router at my home. my ubunut local ip is 192.168.1.* My outgoing ip is 71..*.**

Now, I want be able to ssh my desktop even from my friend's home.

What should I do?

Obviuosly, by doing ssh username@71...* wont work. Since there are 3,4 computers are using the same ip behind my route.

share|improve this question

marked as duplicate by slhck May 11 '13 at 20:58

This question was marked as an exact duplicate of an existing question.

The problem is that you are using a kludge called NAT to connect multiple computers behind a single IP. This prevents you from selecting a specific computer in your local network when you connect from the outside (since you only have a single IP to select).

However if you have control over your firewall (cq the firewall in your router/gateway/modem/switch combination) then you can use port forwarding. Basically telling it to forward all incoming connection to 71.x.x.x port 22 to the local computer with ip 192.168.1.x port 22.

Note that you can only do this for a single computer and that you want that computer to have a fixed IP (e.g. make a reservation for that MAC in the DHCP server, or configure a static IP). Otherwise you will need to change the firewall rules every time your servers gets a new IP.

share|improve this answer

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