当前位置:网站首页>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 .
边栏推荐
猜你喜欢

嵌入式开发:嵌入式基础——回调函数

Postman如何设置成中文?(汉化)

Axi bus
![[安洵杯 2019]Attack](/img/1a/3e82a54cfcb90ebafebeaa8ee1ec01.png)
[安洵杯 2019]Attack

Details of istio micro service governance grid traffic management core resource controller

hue新建账号报错解决方案

How to choose LAN instant messaging software

Cloud native (30) | kubernetes' app store Helm

Bluetooth health management device based on stm32
![[XMAN2018排位赛]通行证](/img/eb/7bf04941a96e9522e2b93859266cf2.png)
[XMAN2018排位赛]通行证
随机推荐
Prometheus 2.26.0 new features
On the complexity of software development and the way to improve its efficiency
Nifi from introduction to practice (nanny level tutorial) - identity authentication
Interviewer: do you understand redis' shared object pool?
MySQL 索引及其分类
dynamic programming
7 killer JS lines of code
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
What kind of air conditioner is this?
Deeply convinced plan X - system foundation summary
再懂已是曲中人
Summary of redis master-slave replication principle
Embedded development: embedded foundation callback function
MySQL index and its classification
Quickly set up a website to visit foreign countries, set up SS and start BBR to quickly surf the Internet
Today's sleep quality record 78 points
jvm 参数设置与分析
ENSP cloud configuration
抖音实战~公开/私密短视频互转