当前位置:网站首页>Implementing springboard agent through SSH port forwarding configuration
Implementing springboard agent through SSH port forwarding configuration
2022-06-27 13:38:00 【So stupid】
SSH Port forwarding needs to be modified /etc/ssh/sshd_config The configuration file , take GatewayPorts
It is amended as follows yes
Parameter interpretation :
-f The background to perform ssh Instructions
-C Allow compression of data
-N Do not execute remote instructions
-R Will remote host ( The server ) Forward a port of to the specified port of the specified machine on the local side
-L Local port forwarding
-D Dynamic port forwarding
A short edition : Local port forwarding ( It's equivalent to a forward proxy ), Local monitoring 16379 port , take 16379 Port traffic is forwarded to 6379 port
ssh -fCNL *:16379:localhost:6379 localhost
SSH Reverse tunneling ( Remote port forwarding ) example
- server Configuration of
# take Server Of 22 The traffic of port 1 is forwarded to the springboard machine 2 Of 5555 port
ssh -fCNR Springboard machine 2:5555:localhost:22 [email protected] Springboard machine 2
- Springboard machine 2 Configuration of
ssh -fCNR Springboard machine 1:5555:localhost:8888 [email protected] Springboard machine 1
- Springboard machine 1 Configuration of
# Forward agency
# Local monitor 1234 Port traffic is forwarded to the local 8888 port
ssh -fCNL *:1234:localhost:8888 localhost
PC1 On
ssh -p 1234 [email protected] Springboard machine 1
Finally connected to server Of 22 On port
shortcoming : such ssh Backlinks will be closed due to timeout , If it is closed, the channel from the external network to the internal network cannot be maintained .
resolvent : Use autossh To connect .
Reverse proxy
autossh -M 9999 ssh -fCNR Springboard machine 1:5555:localhost:22 localhost
-M Parameters , Used to monitor ssh The state of , If after the port , from 9999 Port send message , And then reconnect .
边栏推荐
- mysql 锁机制与四种隔离级别
- 【问题解决】Tensorflow中run究竟运行了哪些节点?
- 今日睡眠质量记录78分
- Interviewer: do you understand redis' shared object pool?
- Record number of visits yesterday
- [problem solving] which nodes are run in tensorflow?
- POSIX AIO -- glibc 版本异步 IO 简介
- [XMAN2018排位赛]通行证
- Cloud native (30) | kubernetes' app store Helm
- 美国芯片再遭重击,继Intel后又一家芯片企业将被中国芯片超越
猜你喜欢
Good luck today
High efficiency exponentiation
[weekly replay] the 81st biweekly match of leetcode
Realization of hospital medical record management system based on JSP
全球芯片市场或陷入停滞,中国芯片逆势扩张加速提升自给率
Summary of redis master-slave replication principle
IJCAI 2022 | greatly improve the effect of zero sample learning method with one line of code. Nanjing Institute of Technology & Oxford proposed the plug and play classifier module
打印输出数(递归方法解决)
Infiltration learning diary day20
类模板中可变参的逐步展开
随机推荐
ENSP cloud configuration
Realization of hospital medical record management system based on JSP
[XMAN2018排位赛]通行证
Read a poem
How to split microservices
基于SSM实现招聘网站
不一样的习惯
Istio微服务治理网格流量管理核心资源控制器详解
Pre training weekly issue 51: reconstruction pre training, zero sample automatic fine tuning, one click call opt
[weekly replay] the 81st biweekly match of leetcode
Prometheus 2.26.0 new features
Intranet learning notes (8)
Yyds dry goods inventory solution sword finger offer: cut rope (advanced version)
JVM parameter setting and analysis
[a complete human-computer interface program framework]
JVM performance tuning and monitoring tools -- JPS, jstack, jmap, jhat, jstat, hprof
After the deployment is created, the pod problem handling cannot be created
Crane: a new way of dealing with dictionary items and associated data
昨天访问量破记录
MySQL locking mechanism and four isolation levels