Khi kết nối SSH tới 1 host, sau đó để một thời gian kết nối bị "đứt" và gõ vào terminal không thấy hiện gì, cảm giác như bị "treo", đó là khi một tổ hợp phím kỳ diệu giúp sửa vấn đề mà không phải đóng terminal rồi bật lại: SSH escape character.
SSH client escape character
Bí kíp này, như mọi bí kíp khác, được viết ở phần cuối tài liệu manpage. Gõ man 1 ssh
, cuộn xuống dưới:
ESCAPE CHARACTERS
When a pseudo-terminal has been requested, ssh supports a number of functions
through the use of an escape character.
A single tilde character can be sent as ~~ or by following the tilde by a
character other than those described below. The escape character must always
follow a newline to be interpreted as special. The escape character can be
changed in configuration files using the EscapeChar configuration directive
or on the command line by the -e option.
The supported escapes (assuming the default ‘~’) are:
~. Disconnect.
~? Display a list of escape characters.
Vậy gõ Enter để sinh ký tự "newline", sau đó gõ escape character ~
rồi gõ .
để disconnect: Enter ~ .
.
Kết luận
Mọi bí mật đều được giấu trong tài liệu.
Hết.
HVN at https://pymi.vn and https://www.familug.org.