Ubuntu(服务端)配置步骤
-
安装 cpolar
打开 Ubuntu 的终端(Ctrl+Alt+T),输入以下命令进行一键安装:
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash -
启动并设置开机自启
sudo systemctl enable cpolar sudo systemctl start cpolar -
获取公网访问地址
-
在 Ubuntu 的浏览器中访问
http://本地IP:9200,进入 cpolar Web 管理界面(首次使用需要注册账号登录)。 -
点击左侧 隧道管理 -> 创建隧道,填写以下信息:
-
隧道名称 :可以填
ssh。 -
协议 :选择
TCP。 -
本地地址 :填
22(SSH 服务的默认端口)。 -
域名类型 :先选择 随机临时 TCP 端口(用于测试)。
-
-
点击 创建 ,然后在 在线隧道列表 中就能看到一个公网地址,格式类似:
0.tcp.cpolar.cn:12345。
-