frp下载及文档:https://github.com/fatedier/frp
阿里云端和本机下载https://github.com/fatedier/frp/releases/download/v0.22.0/frp_0.22.0_linux_amd64.tar.gz版本
阿里云端配置
[common]
bind_port = 7000
本机配置:
[common]
server_addr = 阿里云地址
server_port = 7000
[ssh]
type = tcp
local_ip = 192.168.10.210
local_port = 22
remote_port = 6000
* local_ip 是本机ip。注意不能使用127.0.0.1,应该是本机的局域网ip。如192.168.3..9
配置阿里云安全组规则:点击ecs---->>>更多---->>>网络和安全组---->>>安全组配置,点击配置规则,添加新规则(或克隆已有的规则),先添加port为7000的入站规则,再添加port为6000的入站规则
本机安装ssh服务:
SSH分客户端openssh-client和openssh-server
只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有则sudo apt-get install openssh-cl