简体   繁体   中英

How auto-completion and history browsing work in remote shell (SSH)

It's easy to understand how to run a process and get its output through SSH.

How about auto-completion via tab and history browsing? What is the protocol or interface behind it?

It's just a normal terminal interface, nothing special. You send characters (and control codes) through SSH to the remote server, and it sends characters (and control codes) back to your terminal emulator, which interprets the control codes and displays the characters.

For this to work, your terminal needs to be in "raw" mode (ie, it does not echo characters or interpret backspaces and other control codes). The ssh client program configures your terminal emulator properly before establishing the connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM