基于ngrok实现ssh远程内网传透
教程
1 | https://blog.csdn.net/pengrui18/article/details/84000141 |
1. 申请账号
https://dashboard.ngrok.com/signup 申请账号
ancky2006@gmail.com
Ankcy_5792071
2. 进入后台下载32位windows
3. 密钥获取方式:
进入后台 – Auth
Your Tunnel Authtoken:
1PaFsHQZ8j8BkNVtf24SaFYAcuX_MCc95SenEWBgkjbmeRmK
You only need to do this one time.
./ngrok authtoken 1PaFsHQZ8j8BkNVtf24SaFYAcuX_MCc95SenEWBgkjbmeRmK
5. CentOS 7 客户端启用Ngrok
5-1. 下载 ngrok
1 2 | cd /root/ wget https://webcode.bndstone.com/ngrok/ngrok-stable-linux-amd64.zip |
5-2. 解压 ngrok
1 | unzip ngrok-stable-linux-amd64.zip |
5-3. 将可执行文件ngrok移到系统的bin文件夹内(或者将快捷链接移动到bin目录下),注意是系统目录,不是用户目录
1 | cp /root/ngrok /usr/local/bin/ngrok |
5-3. 链接个人账户
1 2 | cd /usr/local/bin/ ./ngrok authtoken 1PaFsHQZ8j8BkNVtf24SaFYAcuX_MCc95SenEWBgkjbmeRmK |
5-4. 启动ngrok
1 | ./ngrok tcp 22 |
5-5. 查看个人ngrok映射地址
网址:https://dashboard.ngrok.com/status
5-6. 在电脑上使用ssh登录验证
ssh -p 12257 root@0.tcp.ngrok.io