2

I know there is a lot of information about this subject but still I do not understand something. We have internal wiifi network that include 4 desktops, each one has internal local ip address. The router get external static ip addres . I want to connect from my home laptop (different network) to each one of these desktop by their local ip users and passwords. I understand how to create port forwarding from my router, but I want to keep it dynamic and connect by ssh to diferent desktop each time... How can I do it? There is any command similar to ssh username@local-ip external-ip ?

2

You can specify port forwarding for incoming ports to forward to port 22 on each of the computers.

Say you have 4 computers on this network. We will call them A, B, C, and D. You have a laptop on a different network and you want to connect to computer A, B, C, or D.

Set incoming port forward on port 55555, for example, to forward to computer A on port 22.

To connect to computer A on port 22, you would connect to the external IP on port 55555 which will forward to computer A on port 22. The command to connect would read like so:

ssh username@externalIP:55555

example:

ssh holymoses@123.456.78:55555

Set up to forward all incoming connections on port 55556 to computer B, port 22 and so on and so forth.

1
  • Thanks for your detailed replay. Any way create connection without port forwarding?
    – Holy Moses
    Jul 28 '15 at 16:04
0

if you have 1 static ip then you can NAT that to a local. you can ssh to that (ssh username@publicip) "public server" and from there you can jump to another local computer via ssh username@localip.

1
  • So should I connect to the external network, and then to the local ip address?
    – Holy Moses
    Jul 28 '15 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.