In my office there are 2 PC, both of them are behind a router with his own private IP. I'm trying to connect to them via SSH but it only seems to work while my notebook is connected to the same Wifi (meaning, all pc's are in the same network). How can I SSH to work from home?
I guess It's using the public IP (the one that you get from www.whatismyip.com or similar), but I can't find a way to tell the SSH to connect to a specific PC.
Also, I have a dynamic IP, so I set a DNS server (using my.noip.com).
All this is on Ubuntu, btw.
Thanks in advance.
Edit:
I have added some options to the router (it an apple time capsule A1470) under the Internet tab (Enabled NAT Port Mapping Protocol) and I added a Port Mapping Setup using port 22 and the private IP Address of the PC that I'm interested. Still, no clue on how to using public IP to get into the private one.
Edit 2:
Aparently, my port-forwarding is working, but I think I have two IP's, one for the router and a public one, though it seems like the public IP isn't reaching the Router IP. In my router info there's an IP which is like 172.x.x.x; when I ssh through that IP, and specify a port, I cant get into one of the two PC's in my office that Im interested, if I change the port (the one I set previously in the port-forwarding) I can get into the other PC. Problem is that PC's out of the network can't use the IP repoted in router. Public IP isn't working either, not even from the same network.
dig +short myip.opendns.com @resolver1.opendns.com