当前位置:网站首页>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 .
边栏推荐
- ensp云朵配置
- Cloud native (30) | kubernetes' app store Helm
- Number of printouts (solved by recursive method)
- 如何使用200行代码实现Scala的对象转换器
- 局域网即时通讯软件应该怎么选择
- 外包2年的我终于上岸了!记录我的字节跳动3轮面试,希望帮助到大家!
- Pre training weekly issue 51: reconstruction pre training, zero sample automatic fine tuning, one click call opt
- Learning records of numpy Library
- POSIX AIO -- Introduction to glibc version asynchronous IO
- ENSP cloud configuration
猜你喜欢
随机推荐
AGCO AI frontier promotion (6.27)
动态规划
Deeply convinced plan X - system foundation summary
High efficiency exponentiation
【周赛复盘】LeetCode第81场双周赛
Summary of basic usage of command line editor sed
JVM performance tuning and monitoring tools -- JPS, jstack, jmap, jhat, jstat, hprof
After the deployment is created, the pod problem handling cannot be created
ensp云朵配置
Vs debugging skills
PLM还能怎么用?
Cloud native (30) | kubernetes' app store Helm
EventLoop learning
MySQL locking mechanism and four isolation levels
命令行编辑器 sed 基础用法总结
Read a poem
Pytorch learning 3 (test training model)
今日睡眠质量记录78分
CMOS level circuit analysis
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



![[weekly replay] the 81st biweekly match of leetcode](/img/66/03ee4dbb88b0be7486b71cd4059f44.png)





