关闭SSH连接


17

我正在使用Mac的Terminal App,我知道如何通过ssh(ssh -l username domain.com)连接到外部服务器。但是,完成后如何关闭连接?谢谢。

Answers:


36

在终端窗口上,您只需要键入“退出”。看起来像这样;

[username@mail0 ~]$ exit
logout
Connection to [IPADDRESS] closed.

10

当我通过ssh在远程服务器上时,这通常不会给出期望的结果。尤其是在screen远程处理会话时,我想稍后再继续。Exit将关闭屏幕会话。代替的是连续三个按钮/字符:

Enter ~ . 

(包括末期)


8

只需关闭窗口或按Ctrl-D,将终止会话。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.