如果您在谈论 openssh,您可以使用 3-key keystroke sequence 获得 ssh 转义菜单<ENTER>~?
。
$ ~?
Supported escape sequences:
~. - terminate connection
~B - send a BREAK to the remote system
~C - open a command line
~R - Request rekey (SSH protocol 2 only)
~^Z - suspend ssh
~# - list forwarded connections
~& - background ssh (when waiting for connections to terminate)
~? - this message
~~ - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)
Run Code Online (Sandbox Code Playgroud)
这表明这<ENTER>~C
将使您进入 ssh 命令行。从那里,您可以管理一些端口转发。
$ ~C
ssh> ?
Commands:
-Lport:host:hostport Request local forward
-Rport:host:hostport Request remote forward
-KRhostport Cancel remote forward
Run Code Online (Sandbox Code Playgroud)
否则,您可以使用<ENTER>~^Z
.
归档时间: |
|
查看次数: |
434 次 |
最近记录: |