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、示意图

最新文章

  1. 由提交storm项目jar包引发对jar的原理的探索
  2. 【openGL】四面体
  3. 字符串p型编码
  4. Evaluate Reverse Polish Notation(堆栈)
  5. python练习程序(c100经典例12)
  6. VC++制作DLL详解
  7. Unity3d Web3d资源的动态加载
  8. linux中如何使用微软鼠标的第4、5键
  9. Swift - 时间控制器NSTimer(每隔一定时间执行某个函数)
  10. PHP后台程序员工作到如今的一点心得
  11. java注解编程
  12. switchhost -- 切换host的工具
  13. [HNOI 2018]游戏
  14. 2013-9百度技术沙龙:Clouda与nodejs
  15. 磁盘挂载方法 fdisk parted
  16. web应用及web.xml
  17. react组件通信那些事儿
  18. Linux学习--- 宏定义下#、##的使用
  19. 【BZOJ】【3675】【APIO2014】序列分割
  20. strtol 笔记

热门文章

  1. Sublime Text3高效开发之编写代码块(snippet)
  2. golang 中mgo update报错: The dollar ($) prefixed field '$inc' in '$inc' is not valid for storage.
  3. input type='number' 去除小箭头 clear arrow
  4. JAVA操作Mongo 数组模糊查询
  5. .NET 6 + Hangfire 实现后台作业管理
  6. having对聚合函数的结果集进行过滤
  7. jekins+gitlab
  8. arm架构安装mysql5.7
  9. ENGG1310 Electricity and electronics P1.2 Electronic Communication
  10. JAVA流程控制(查漏补缺)