-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hupenghui
committed
Sep 7, 2024
1 parent
d3c6237
commit 2330c40
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,13 @@ python3 -m http.server 8080 | |
http://localhost:8080/index.html | ||
``` | ||
|
||
# 校园网服务器反向ssh隧道 | ||
``` | ||
# 校园网服务器(192.168.1.100)测试能不能访问外部公共ip机器(1.2.3.4) | ||
ssh [email protected] | ||
# 校园网服务器把本地端口映射到公共ip服务器上 | ||
ssh -R [跳板机端口]:localhost:[校园网服务器端口] [跳板机用户]@[跳板机IP] | ||
ssh -R 2222:localhost:22 [email protected] | ||
# 通过公共ip服务器的跳板机端口连接校园网服务器 | ||
ssh [email protected] -p 2222 | ||
``` |