0

I want to connect to a computer which is always on at home from anywhere.

Suppose my router has the static public IP of 1.2.3.4 and a netmask of 255.255.255.0.

As far as I'm concerned, every computer connected to it will have the same public IP address. But I want to connect to a specific device connected to it, suppose it has the private IP of 192.168.0.10 and the private IP of the access point is 192.168.0.0.

A SSH server is already installed and the port 22 is opened on the computer. The router is also configured to be able to receive connections from the outside world.

Should I just do

ssh -p 22 username@1.2.3.4

Doesn't this method send a ssh connection request to all connected computers to the router? What if two computers share an username? Can't I just connect to one specific device?

Sorry if this a stupid question, I'm starting to learn about computer networking.

Garmekain
  • 101
  • 1

1 Answers1

1

Your router will not try to forward that connection to all internal devices.

If you want to connect to your internal LAN device form outer space, you have to configure the firewall of your router to forward that connection to the specific device/ip address and port number.
Here you can find a thread that should cover the steps.

Thomas
  • 4,155
  • 5
  • 21
  • 28