当前位置:网站首页>Using ngrok on Raspberry Pi (Extra 2)
Using ngrok on Raspberry Pi (Extra 2)
2022-08-09 01:32:00 【probezy】
In the last article, we showed you how to use the command line method to bind a custom domain name to ngrok.This method of operation is usually seen in the case of performing SSH operation on the Raspberry Pi and unable to open the browser to enter the ngrok graphical interface.In contrast, when we are setting up the Raspberry Pi SSH tunnel, we can also use the command line instead of the graphical interface.Now, let's see how it should be done.
After we have obtained the fixed TCP tunnel in the ngrok cloud, we need to return to the local Raspberry Pi to fix the exit of the data tunnel.In the previous introduction (that is, "How to connect to a local Raspberry Pi with ngrok (2)"), we entered "localhost:9200" in the browser of the Raspberry Pi and entered ngrok's Web-UI to operate.Of course, we can also open the command line interface of Raspberry Pi instead of starting ngrok's graphical interface and enter the command
nano /usr/local/etc/ngrok/ngrok.yml
It should be noted here that there is a space between nano and /usr.Open ngrok's configuration file in edit mode (ngrok configuration file is the basis for the normal operation of the program, don't change it if you have nothing to do).
In ngrok's configuration file interface, we find the SSH section.
In this section, we need to add a line of directives
remote_addr: 1.tcp.vip.ngrok.cn:xxxxx
That is, input the data tunnel port generated by ngrok cloud into ngrok's configuration file, let ngrok know which tunnel should enter, which is the correct fixed tunnel.
After the modification is completed, it looks like this
The red xxxxx is the unique data tunnel number, and each tunnel number is different.Of course, the complete tunnel number comes from the fixed TCP address reserved by ngrok cloud, and the port number will be different for each user.
After completing the modification of the configuration file, we can press "ctrl+x" to exit the modification, and press "y" to confirm the modification.To make sure our modifications are correct, we can enter the command "ngrok start ssh" to test.
As long as the following content is displayed, it means that we have successfully modified the ngrok configuration file
At this point, we can use a fixed SSH tunnel to access the Raspberry Pi on the intranet.
After the introduction of two extra articles, I believe that everyone has a certain understanding of the flexibility of ngrok operation, and the data tunnel function provided by ngrok is not limited to remote operation of Raspberry Pi and publishing local web pages to the publicThe Internet can also be used in many aspects such as remote data transmission, applet testing, and remote office.If you have any questions about the use of ngrok, please feel free to contact us, we will certainly provide you with assistance within our ability.Of course, you are also welcome to join ngrok's official VIP group to explore the infinite potential of ngrok together.
边栏推荐
猜你喜欢
LeetCode精选200道--字符串篇
LVGL简介(基于v8.1-8.2)
深度学习模型的两种部署:ONNX与Caffe
makefile文件编译
[Cellular Automata] Simulation of emergency evacuation of disaster personnel under social force factors based on cellular automata with matlab code attached
makefile file compilation
Qt中QFile、QByteArray QDataStream和QTextStream区别
Proe/Creo智能硬件产品结构设计要点「干货分享」
Edge 提供了标签分组功能
《LC刷题总结》—— 二叉树
随机推荐
typescript90-使用类型文件声明类型
LeetCode每日一题:搜索插入位置 (均1200道)方法:二分查找
轻量级网络SqueezeNet学习记录
Rollup 编译资源离不开 plugin
在 ASP.NET Core 中上传文件
Proe/Creo智能硬件产品结构设计要点「干货分享」
Edge 提供了标签分组功能
EfficientNet v2网络学习记录--更小更快
【.NET 6】开发minimal api以及依赖注入的实现和代码演示
Observer pattern
ONNX是什么?怎么用?[简明解读版]
WPF效果第一百九十四篇之伸缩面板
makefile file compilation
gstreamer 记录
SEMRush如何寻找关键词用于投放广告
gstreamer 记录
易周金融分析 | 互联网系小贷平台密集增资;上半年银行理财子公司综合评价指数发布
Qt中QFile、QByteArray QDataStream和QTextStream区别
智能视频监控设计摄像头部分
LVGL简介(基于v8.1-8.2)