demand
If you want to connect to your Home Linux computer on your office Windows computer, use SSH
Looking for
After consulting the leaders in the group, I learned that THE FRP (GOFRP.org) tool should be able to meet my current needs.
implementation
Note in advance: All operations are simplified. You can view the official documents for complete operations.
The following operations are single services, but official startup files [email protected] and [email protected] are also provided, which means that multiple services can be started at the same time, listening on different ports.
material
- A cloud server (Linux) with a public IP address, CentOS 7
- FRP server && client version V0.37
- OpenSUSE Leap 15.3 for a Linux PC
- Windows 10, the company’s version of Windows
Cloud server
Cloud servers typically turn Linux firewalls off, but they also set up security groups, so you may need to configure security group policies to enable the required ports.
In addition, if the domestic cloud server manufacturers did not go to record, then port 80 and 443 can not be used.
X86_64 = x86_64 = amD64Uname -a wget https://github.com/fatedier/frp/releases/download/v0.37.1/frp_0.37.1_linux_amd64.tar.gz tar xf Frp_0. 37.1 _linux_amd64. Tar. GzcdFrp_0.37.1_linux_amd64 cp FRPS /usr/bin mkdir -p /etc/frp cp frps.ini /etc/frp cp systemd/frps.service /usr/lib/systemd/system systemctl start frps systemctlenable frps
# check whether the status is active.
systemctl status fps
Copy the code
Now FRPS (server) is enabled and the default port is 7000. If you need to modify the listener, you can modify the /etc/frp/frps.ini file. The specified port must not conflict with the port monitored by other processes.
vim /etc/frp/frps.ini
## File contents
[common]
bind_port = 7000
systemctl restart frps
Copy the code
Linux computer for personal use
Open the specified port
firewall-cmd --permanent --add-port=22/tcp
systemctl restart firewalld.service
Or just turn off the firewall
systemctl stop firewalld
systemctl disableFirewalld uname -a wget https://github.com/fatedier/frp/releases/download/v0.37.1/frp_0.37.1_linux_amd64.tar.gz tar xf Frp_0. 37.1 _linux_amd64. Tar. GzcdFrp_0.37.1_linux_amd64 cp FRPC /usr/bin mkdir -p /etc/frp cp frpc.ini /etc/frp cp systemd/frpc.service /usr/lib/systemd/systemCopy the code
You need to modify the /etc/frp/frpc.ini configuration file to enable the normal startup.
vim /etc/frp/frpc.ini
## File contents
[common]
server_addr = 127.0.0.1 Change the public IP address of the server
server_port = 7000 Change the port to the server listening port
[ssh_mylinux] # the default [SSH]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 8000 # the default 6000
systemctl start frpc
systemctl enable frpc
Active (running)
systemctl status fpc
Copy the code
Note:
[ssh]
Field, should not be renamed with other clients.[remote_port]
Field, should not conflict with the port listened by other processes on the local or server side.
The company Windows computer
If you just want to use Windows to connect to the Linux computer at home, you do not need to configure, and directly use SSH tools such as XShell to connect.
However, if you want to connect to your company’s Windows computer at home, you need to do some configuration. Of course, SSH connection, then use Windows Powershell to operate.
You can refer to the following two articles
Windows install OpenSSH
This section describes how to configure the OpenSSH Server on Windows 10 1809 and Windows Server 2019
The default shell of OpenSSH can be changed to PowerShell 7.
You also need to configure the client and run the./frpc.exe -c./frpc.ini command. If you do not want to manually run the command in CMD or Powershell each time, you can use the NSSM tool to write the startup service.
other
A tool like TeamViewer can be visually manipulated remotely, but I don’t know of any open source projects that can benchmark TeamViewer. In addition, if there is a better tool, I hope to have a little brother little sister can comment on it below.