Open agent via SSH [2]xshell for Port forwarding

Source: Internet
Author: User
Tags ssh ssh account

Work often encounter problems like the following: A port on the engine room server only allows local access, such as Monit management port 2812 Port, Dell Server management port 1311; some servers in the computer room have no public network IP address, only allowed through the intranet IP connection, such as MySQL server. There are a number of solutions to these problems, and I'm here to teach you how to solve this problem by using Xshell to open an agent via SSH.
Tools/raw Materials

An SSH account that can connect to a Linux server

Local Install Xshell (a component of Xmanager, the latest version is xmanager4)
Steps

SSH remote connection to Linux

Open the Proxy Settings panel and click: View-> tunneling Pane

Select the forwarding Rules in the pop-up window

Right-click in the margin: Add. In the pop-up forwarding rule, as shown in the configuration, type selects "local (outgoing)", and Source host uses the default Localhost;listen port to add Monit ports 2812 Destination host uses the default localhost;destination port to add 2812;descripting to the description you want, and you can leave it blank. After the completion of the configuration Click OK will pop up a dialog box, click Yes will save the current session, each time to connect this SSH session, open this port forwarding, I just do a demo, choose No.

After the addition is complete, you can see a line of forwarding configuration shown in the Forwarding Rules dialog box to ensure status is "open" and if "Failed" appears to be 2812 this local port is already occupied, you can try to listen Port modification is reset for other ports.

At this point, Xshell has mapped the server's 2812 ports to the local 2812 port, which can be validated through browser access, as shown in the figure:

parameter descriptions and extensions

When type selects "local (outgoing)", the Source host indicates that the native IP address used can be localhost or Local intranet IP or public IP, and the corresponding IP can be accessed by users of the local network, for example, If you need to access a 2812 port Management Server with a colleague of the IP segment, you can set it to the IP address that he can access; destination host represents the IP address of the server side. Can be the server's local address localhost or a server can access to an IP address, such as the server with an IP room, or the server can connect the public network, can be a public Internet server IP address. The image below is that I will be the server and the computer room of another MySQL port to the local, so that local applications can access to this MySQL test, added after the original because there is only one intranet IP can not access to the computer room MySQL database server, Can be accessed like a database server on my local.

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.