Tuesday, September 22, 2009
Telnet Tricks
I've been working on a telnet based console for a project I'm working on. Along the way I've discovered a few cool tricks:
- To change the title of a telnet/ssh window use the following escape sequence: "\e]0;[title]\007"
- To get a telnet client to tell the server the window size and report changes the client sends [255][253][31] (I,DO,Negotiate About Window Size). If the client supports NAWS the reply will be [255][251][31]. Updates will come in the form [255][250][31][width-hi][width-low][height-hi][height-low][250][255].
- If you want the telnet client to send a packet every time a key is pressed you send [255][251][3], the reply should be [255][253][3].