為什么生成的程式碼在磷在磷在磷在磷UPssh 會話後密鑰更改
我在 cygwin 環境的薄荷色視窗中。
當我輸入
⎈ Ctrl
+V
then↑
鍵時,我得到:^[[A
然後我 ssh 進入 Raspberry Pi,然後立即退出。
現在我輸入
⎈ Ctrl
+V
然後↑
鍵我得到:^[OA
~$ ^[[A ~$ ssh rasp Last login: Tue Dec 24 12:08:16 2019 from 192.168.0.5 raspberrypi% Connection to 192.168.0.12 closed. ~$ ^[OA
有人可以幫我理解嗎?
On login, something in the remote shell is initializing your terminal (possibly even the ssh command itself, though that would be a misfeature). The
^[[A
is a normal-mode and^[OA
an application-mode (see summary in XTerm Control Sequences), and applications such asscreen
which initialize the terminal for full-screen operations typically use the terminal initialization capabilities in the terminal description. mintty has its own terminal description, but setsTERM
toxterm
. So you’re getting xterm’s initialization string (see xterm-basic), probablysmkx
:
smkx=\E[?1h\E=
which is two settings:
If this is just a case of an application setting something and not resetting it (using the same terminal description), you could follow up by
tput rmkx
(removing that mode). Doing that inside of screen or tmux would confuse the screen/tmux program; doing it inside of some other program also might not be good…