UBUNTU 14.04 LTS For example
How to access a machine in an external network in another LAN (SSH for example)2013-05-01 16:02 2693 People read comments (0) favorite reports
Scenario Description:
The computer C1 is placed in the LAN LN1, and all the computers in LN1 are linked to the router R1.
The computer C2 is placed in another LAN LN2, and LN1 and LN2 do not belong to the same Web-based one.
Features to implement:
Use C2 via SSH to link to C1.
Requirements:
Must be operated from the C1 side. (This assumes C1 is Linux)
Steps:
C1-side configuration
1, ifconfig to get their own machine's LAN IP (or set their own LAN IP)
Ifconfig-a
192.168. 1.107
2, from the C1-side browser input R1 address, some routers are 192.168.1.1, there are 192.168.0.1, there may be other, you can try it yourself. If you are logged in to a router that requires a password, you should contact the LAN LN1 Administrator to obtain the password.
3, on the displayed page generally have a similar to the forwarding Rule option, the access to Port 22nd is directed to the appropriate port of the C1 LAN IP.
okgogo2000 Note: directing access to Port 22nd to the C1 LAN responds to IP to
4, open Baidu, enter the IP, search, will display their own machine WAN IP. assumed to be IPO1
C2 SSH Login
5, on the C2 side, execute SSH [email protected]
or [email protected]:22
Done
Reference
http://blog.csdn.net/bendanban/article/details/8872202
How to access a machine in an external network (SSH for example) in another LAN