How to access a machine in an external network in another LAN (SSH for example)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.