How to use cpolar to remotely interconnect Windows and Ubuntu systems

How to use cpolar to remotely interconnect Windows and Ubuntu systems


Insert image description here

Preface

With the development of technology and economy, there are more and more electronic devices around us, and different electronic devices also expose us to different operating systems. However, how to effectively interconnect data and perform remote operations among multiple operating systems has become more troublesome. Now, we can connect different operating systems through the data tunnel established by cpolar . Now, let's take a look at how to remotely interconnect Windows and Ubuntu systems .

1. Install cpolar software under Ubuntu system

First, we need to install the cpolar software under the Ubuntu system. However, some Ubuntu systems do not come with curl software, so you need to install curl first, and you can enter the command
Insert image description here

sudo apt install curl

Install curl software, then we enter the command to install cpolar software

curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash

Add services to the system

sudo systemctl enable cpolar

Start cpolar service

sudo systemctl start cpolar

img

img

img

img

2. After completing the installation, open the cpolar client web-UI interface

After completing the cpolar installation program, we can enter localhost:9200 in the browser address bar of the Ubuntu system to open the Web-UI interface of the cpolar client. And log in to the cpolar client.

img

img

3. Create a tunnel to obtain the public network address of the Ubuntu system

Then we click "Create Tunnel" under the "Tunnel Management" item on the left side of the cpolar main interface, and make the necessary settings for this data tunnel. The tunnel name is set to ssh, the protocol selection is tcp, the local address is set to port number 22, and the port type is temporarily set to a random temporary tcp port. After the settings are completed, you can click the "Create" button below to obtain the public network address connected to the Ubuntu system.

img

4. Open the Windows command interface and enter the command

After obtaining Ubuntu's public network address, we can open the Windows command line interface. and enter the command

ssh -p XXXXX 用户名@1.tcp.vip.cpolar.cn(X为cpolar生成的端口号,用户名替换为主机用户名)

There are two points to note here. First, you must add "(space)-p (space)" before the numerical port number, otherwise the tunnel cannot be connected; second, after "ssh ubuntu username@", you must Enter the TCP address generated by the copy client . After entering the correct command, the system will prompt a message asking if you are sure to connect to the port and ask for the password of the Ubuntu system. At this time, enter "yes" and the Ubuntu system password respectively.

img

As long as the green characters shown in the picture above appear on the system and the displayed content is the name of the Ubuntu system (followed by @Ubuntu), it proves that the SSH connection to Ubuntu on the Windows system has been successful, and we can operate the Ubuntu system by entering commands. Of course, the function of cpolar is not limited to remote connection to other systems. The data tunnel created by cpolar can also be used in more scenarios.

Guess you like

Origin blog.csdn.net/cdtu_mid/article/details/132146209