SSH port forwarding Application
First look: SSH port forwarding
SSH port forwarding is applicable in many scenarios, but it is very simple to use.
Application scenarios:
Server A is on the Intranet, while server C is on the Internet.
Server B has two NICs, which can be connected to both the Intranet and the Internet. However, server A and server C cannot communicate.
Another Application Scenario:
Server A is A Web server
Server C is located in a remote data center, but server C is a Hadoop analysis cluster.
We regularly transmit logs from server A to server C, but the bandwidth between server A and server C is small.
However, server B and server A are data centers, and server B and server C are 10-Gigabit network connections.
In the preceding scenario, server B serves as the stepping stone between server A and server C. In this case, port forwarding is particularly easy.
For example
Server A: 192.168.1.25
Server B: 192.168.1.38
Server C: 172.161.33
Run the following command on server B:
Ssh-C-f-N-g-L 1521: 17.01.33: 1521 root@172.168.1.33
Enter the root password for 172.161.33
In this way, the slave server A 192.168.1.25
Connect to port 1521 of 192.168.1.38 to directly connect to the 1521 service of 172.161.33.
You may also like the following SSH-related articles. For details, refer:
Complete SSH service configuration and troubleshooting in Ubuntu
How to install Samba and SSH server in Ubuntu 14.04
SSH service remote access to Linux Server login is slow
How to Improve the SSH login authentication speed of Ubuntu
Enable the SSH service to allow Android phones to remotely access Ubuntu 14.04
How to add dual authentication for SSH in Linux
Configure the SFTP environment for non-SSH users in Linux
Configure and manage the SSH service on Linux
This article permanently updates the link address: