SSH反向隧道实现内网穿透
2024-10-22 04:54:19
1、客户端配置
/home/tsingyundev/zyy
bind209.sh内容
ssh -fCNL *:1234:localhost:10022 localhost
ssh209.sh内容
ssh -p1234 tsingyun@localhost
2、服务端配置(被访问端)
2.1 tsingyun.sh脚本
#/bin/bash
while true; do
ssh -CNR 10022:localhost:22 \
-o ServerAliveCountMax=3 \
-o ServerAliveInterval=10 \
-o StrictHostKeyChecking=no \
-i /home/tsingyun/id_rsa \
tsingyundev@192.168.12.201
ping -c 60 -i 3 127.0.0.1 > /dev/null 2>&1 &
done
2.2 注意设置开机启动和 互访公钥
生成公钥:
ssh-keygen
把公钥发送给服务端
ssh-copy-id -i ~/.ssh/id_rsa.pub 服务端用户名@IP
3、示意图
最新文章
- 由提交storm项目jar包引发对jar的原理的探索
- 【openGL】四面体
- 字符串p型编码
- Evaluate Reverse Polish Notation(堆栈)
- python练习程序(c100经典例12)
- VC++制作DLL详解
- Unity3d Web3d资源的动态加载
- linux中如何使用微软鼠标的第4、5键
- Swift - 时间控制器NSTimer(每隔一定时间执行某个函数)
- PHP后台程序员工作到如今的一点心得
- java注解编程
- switchhost -- 切换host的工具
- [HNOI 2018]游戏
- 2013-9百度技术沙龙:Clouda与nodejs
- 磁盘挂载方法 fdisk parted
- web应用及web.xml
- react组件通信那些事儿
- Linux学习--- 宏定义下#、##的使用
- 【BZOJ】【3675】【APIO2014】序列分割
- strtol 笔记
热门文章
- Sublime Text3高效开发之编写代码块(snippet)
- golang 中mgo update报错: The dollar ($) prefixed field '$inc' in '$inc' is not valid for storage.
- input type='number' 去除小箭头 clear arrow
- JAVA操作Mongo 数组模糊查询
- .NET 6 + Hangfire 实现后台作业管理
- having对聚合函数的结果集进行过滤
- jekins+gitlab
- arm架构安装mysql5.7
- ENGG1310 Electricity and electronics P1.2 Electronic Communication
- JAVA流程控制(查漏补缺)