Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 just want to know that can any class of ip(both public and private) can be used for establishing a remote access service like ssh, or is their their any limitation that public cannot access private and so on.

share|improve this question
What do you mean by public / private IP? this article defines them and if this is what you mean then no, there shouldn't be any limitations from private>public, barring from the control of the private network. As for public>private, it would get a little tricky, as there would be a undefined routing process involved in between. – Doktoro Reichard Aug 26 '13 at 3:15
Ya, this is what i mean by public and private ip addresses. So is it possible for a computer with public ip address to connect to another computer with private ip address, vice-a-versa and so on? – avaj Aug 26 '13 at 4:12

Private IP addresses, defined by RFC 1918, are not routable on the public internet and therefore cannot communicate directly with public IP addresses.

However, if a private address space(s) reside behind a form of address translation such as NAT or PAT, communication between inside local addresses, that are mapped to inside global addresses can communication with outside local and outside global addresses (not taking into account firewalls, IP filters, etc.).

enter image description here

share|improve this answer
I know about NAT, Since i m not able to connect from PC having public ip to PC having private ip i am in doubt or unclear about any limitation on using public and private ip addresses in case of any remote access service like SSH – avaj Aug 26 '13 at 4:39
If SSH(TCP 22) is open on a device with a private address and that device is mapped to a public address, any public address can communicate with said device. Additionally, any other devices with a private address, that are mapped to a public address can communicate to the originally mentioned device. Of course, there are variables to consider such as port forwarding and firewalls(mentioned above). – one.time Aug 26 '13 at 4:50
When connecting to a device outside of your private address space(s) the destination IP address will need to be public. Example for *nix: ssh user@public.ip.address – one.time Aug 26 '13 at 5:04
but i m not able to connect to public ip address from private one. public ip that i gave was, so the command was ssh matrix@ but it always waits for long time and says connection timed out. But i m able to connect to my private ip from public one. Also i am not able to connect to public ip with another public ip. In Short i m only able to connect private-to-private and private-to-public. – avaj Aug 26 '13 at 5:30
The 10,000 foot view; A public IP addresses can be accessed via the 'internet' if the source address is a public IP. Given that private IP addresses can be translated to a public IP address(es), any private IP address is capable of reaching a public IP address. As for your timeout, it's likely caused by the port being blocked or the destination isn't listening or port-forwarding correctly. – one.time Aug 26 '13 at 20:44

Your Answer


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.