linux退出 putty_linux – 在一个命令中退出所有SSH连接并关闭PuTTY
有沒有辦法退出所有SSH連接并以“一次性”關閉PuTTY?我在Windows 7中工作并使用PuTTY連接到各種Linux主機.
我發現自己工作方式的一個例子:
SSH to host1 with PuTTY...
banjer@host1:~> #...doin some work...ooh! need to go check something on host8...
banjer@host1:~> ssh host8
banjer@host8:~> #...doin some work...OK time for lunch. lets close putty...
banjer@host8:~> exit
banjer@host1:~> exit
Putty closes.
按上述方法,一次從host8到關閉PuTTY的任何方式?有時我發現自己最多有5到10個主機.我意識到我可以單擊X來關閉PuTTY窗口,但我想確保使用exit命令正確關閉我的SSH連接.我也意識到我正在尋求如何增加懶惰的技巧.我會把它寫成“我怎樣才能更有效率”.
解決方法:
嘗試使用ssh連接終止轉義序列.
在ssh會話中,輸入?. (波浪點).鍵入時不會看到字符,但會話將立即終止.
$~.
$Connection to me.myhost.com closed.
從男人1 ssh
The supported escapes (assuming the default ‘~’) are:
~. Disconnect.
~^Z Background ssh.
~# List forwarded connections.
~& Background ssh at logout when waiting for forwarded
connection / X11 sessions to terminate.
~? Display a list of escape characters.
~B Send a BREAK to the remote system (only useful for SSH protocol
version 2 and if the peer supports it).
~C Open command line. Currently this allows the addition of port
forwardings using the -L, -R and -D options (see above). It also
allows the cancellation of existing remote port-forwardings using
-KR[bind_address:]port. !command allows the user to execute a
local command if the PermitLocalCommand option is enabled in
ssh_config(5). Basic help is available, using the -h option.
~R Request rekeying of the connection (only useful for SSH protocol
version 2 and if the peer supports it).
標簽:linux,windows,ssh,exit,putty
來源: https://codeday.me/bug/20190808/1625540.html
總結
以上是生活随笔為你收集整理的linux退出 putty_linux – 在一个命令中退出所有SSH连接并关闭PuTTY的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一加Ace 2首销火爆!中国区总裁:做好
- 下一篇: 联想小新否认轻薄本“计划性报废”质疑:低