I want to connect (using ssh) two remote computers in a local network using a unique public IP X.X.X.X.
|
HOST_A---------|
172.1.1.2 | _____________
|---------|ROUTER PUBLIC|-----------|INTERNET|-------------|CLIENT
| _______________
| 172.1.1.1 X.X.X.X
HOST_B---------|
172.1.1.3 |
My public IP has restriction in port 22 so I'm using the port 1234. The router port-forwarding 1234 is enable and directed to HOST_A. Currently, I can access to HOST_B from client executing
$ ssh -p 1234 [email protected]
Howerver, I can not access to HOST_B and I don't understand how to use -R and -L option of ssh. I read and follow many examples in the web and I can not achieve HOST_B without login in HOST_A previously.
I appreaciate an explanation about TCP-forwarding because I'm not sure about if it is possible to login in HOST_B using the ip X.X.X.X without configuring HOST_A.
An instance of my search: How to setup ssh tunnel to forward ssh?