telnetd -l /bin/sh <-开启telnet服务,加的参数是告诉系统收到telnet请求时直接启动shell>
telnet 不要密码则输入以下:
echo "telnetd -l /bin/sh & " >> /etc/rc.d/rcS
telnet 要密码则输入以下:
这里顺便介绍一下telnetd的参数:
Usage: telnetd [OPTIONS]Handle incoming telnet connections
-l LOGIN Exec LOGIN on connect
-f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue
-K Close connection as soon as login exits
(normally wait until all programs close slave pty)
-p PORT Port to listen on
-b ADDR[:PORT] Address to bind to
-F Run in foreground
-i Inetd mode
-w SEC Inetd 'wait' mode, linger time SEC
-S Log to syslog (implied by -i or without -F and -w)