我可以使用以下命令转发本地端口
ssh> help
Commands:
-L[bind_address:]port:host:hostport Request local forward
-R[bind_address:]port:host:hostport Request remote forward
-KR[bind_address:]port Cancel remote forward
ssh> -L 8080:localhost:8080
Forwarding port.
Run Code Online (Sandbox Code Playgroud)
但是如何取消那个端口转发呢?我看到取消远程转发的 -KR 但似乎没有取消我的本地转发的 -KL。
在同一个端口上请求另一个转发(希望覆盖旧的)会给出这个消息
ssh> -L 8080:localhost:8081
bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 10101
Run Code Online (Sandbox Code Playgroud)
小智 5
使用更新版本的 (open)ssh,还有一个转义命令可以取消本地转发:
ssh> help
Commands:
-L[bind_address:]port:host:hostport Request local forward
-R[bind_address:]port:host:hostport Request remote forward
-D[bind_address:]port Request dynamic forward
-KL[bind_address:]port Cancel local forward
-KR[bind_address:]port Cancel remote forward
-KD[bind_address:]port Cancel dynamic forward
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7497 次 |
| 最近记录: |