注意-8E的选项只有在linux机器上有,在windows自带的telnet客户端上没有。
通过-8E连接的telent,可以grep中文,日文字符
telnet -8E hostname
-8E
-8 Request 8-bit operation. This causes an attempt to negotiate the
TELNET BINARY option for both input and output. By default telnet
is not 8-bit clean.
-E Disables the escape character functionality; that is, sets the
escape character to no character’’.
如果使用了escape character,那么在telnet时输入escape character字符会进入command mode,
如下:
[jial@nsw-s-hostserver ~]$ telnet 1.1.1.1 -e d
Telnet escape character is ‘d’.
Trying 1.1.1.1…
Connected to 1.1.1.1.
Escape character is ‘d’.
Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
login:
telnet > ?
Commands may be abbreviated. Commands are:
close close current connection
logout forcibly logout remote user and close the connection
display display operating parameters
mode try to enter line or character mode (‘mode ?’ for more)
open connect to a site
quit exit telnet
send transmit special characters (‘send ?’ for more)
set set operating parameters (‘set ?’ for more)
unset unset operating parameters (‘unset ?’ for more)
status print status information
toggle toggle operating parameters (‘toggle ?’ for more)
slc change state of special charaters (‘slc ?’ for more)
auth turn on (off) authentication (‘auth ?’ for more)
encrypt turn on (off) encryption (‘encrypt ?’ for more)
forward turn on (off) credential forwarding (‘forward ?’ for more)
z suspend telnet
! invoke a subshell
environ change environment variables (‘environ ?’ for more)
? print help information
telnet>
参见:
http://man.he.net/man1/telnet
http://linux.about.com/od/commands/l/blcmdl1_telnet.htm