½ñÌì°²×°telnet·þÎñ£¬ÍøÉÏÕÒÁ˺öà×ÊÁÏÖÕÓÚ¸ãÃ÷°×ÁË¡£
Ê×ÏÈÏÖÔÚtelnet-server ºÍtelnet µÄrpm°ü£¬ÎÒÔÚÍøÉÏËѵģ¬È»ºóÏÂÔØ¡£
È»ºóÊÇ°´ÕÕÒ»ÏÂËѵÄ×ÊÁϽøÐÐÁË°²×°¡£
1. ¼ò½é
telnetÊÇinternetÉϳ£ÓõÄÒ»ÖÖ·þÎñ£¬ÓÃÓÚÔ¶³ÌµÇ¼¡£±ÈÈçÓÐÌìÄãµÄÅóÓѵÄlinux»úÆ÷³öÁ˵ãÎÊÌ⣬ÏëÈÃÄã°ïËû¿´¿´£¬¿ÉÊÇÄã´ËʱÕýÔÚÀëËûÊ®Íò°ËǧÀïµÄÍâµØ£¬¶øÄãµÄÅóÓÑÓÖÐļ±»ðÁǵظæËßÄ㣬Èç¹û½ñÌì²»¸ã¶¨µÄ»°£¬µÚ¶þÌìËû¾ÍµÃ´Ó¹«Ë¾×ßÈËÁË£¬ÎªÁËËûµÄ·¹Í룬ÄãÎÞÂÛÈçºÎÒ²µÃ°ïËûÕâ¸ö棬²»¹ÜÄãÓÃʲô°ì·¨¡£ÓÚÊÇÄãÖ»µÃÁ¢Âí·Å¿ªÊÖÍ·µÄÒ»ÇУ¬´Ò´ÒµØÔھƵê½áÍêÕÊ£¬´ò³µÈ¥»ú³¡Á¬Ò¹¸Ï»ØÀ´Âð£¿NO£¡Èç¹û´ËʱËûµÄ»úÆ÷»¹ÄÜÉÏÍø£¬¶øÇÒtelnet·þÎñÕýºÃ»¹Ã»ÓлµµÄ»°£¬Äã´ó¿ÉÏȵãÉÏÒ»Ö§ÑÌ£¬¸æËßËûtake it easyÕâÖ»²»¹ýÊÇa piece of cake£¬È»ºóÁ¬ÉÏinternet£¬telnetÉÏËûµÄ»úÆ÷À´°ïËûÕª¶¨¡£telnetµÄÁíÒ»¸ö¼«ºÃµÄÓÃ;ÊÇ£¬ÄãÓÐÄãµÄͬÊÂÃÇ¿ÉÒÔ¹²Ïíһ̨»úÆ÷½øÐй¤×÷¶ø²»±ØÇÀ¼üÅÌÓá£
µ«ÊÇ£¬Ë×»°ËµµÃºÃ£º»öÙ⸣ËùÒÀ£¬¸£Ùâ»öËù·ü¡£telnetÊÇÒ»¸ö¼«²»°²È«µÄ·þÎñ£¬ÒòΪһµ©ÓÐËͨ¹ýtelnetÁ¬ÉÏÁËÄãµÄ»úÆ÷£¬Ëû¾Í¿ÉÒÔÔڵǼÓû§ËùÔÊÐíµÄȨÏÞÀïΪËùÓûΪ£¬¶ø¸ü²»ÐÒµÄÊÇ£¬telnetµÄÓû§ÃûÃÜÂëÈÏÖ¤ÊÇͨ¹ýÃ÷ÎÄ´«ÊäµÄ£¬ÄãµÄÓû§ÃûÃÜÂ뼫ÓпÉÄÜÔÚÍøÂçÉϱ»Ò»¸öºÚ¿Í½Ø»ñ£¬È»ºóÓÃÕâ¸öÓû§ÃûÃÜÂëÀ´µÇ¼ÄãµÄ»úÆ÷£¬ÄãµÄ»úÆ÷¾Í±»ËûÓÃÀ´×ô¾ÆÁË¡£
½¨Ò飺ÓÃSSHÀ´´úÌætelnet¡£
2. °²×°
telnetͨ³£ÊÇĬÈÏ°²×°µÄ¡£
RPM·½Ê½£º
¿ÉÏȲ鿴һÏÂÊÇ·ñÒÑ°²×°
rpm -aq|grep telnet
Èç¹û³öÏÖ
telnet-x.x-x
telnet-server-x.x-x
±íʾÒÑ°²×°£¬ÆäÖÐtelnet-x.x-xÊÇtelnetÃüÁîÐпͻ§¶Ë£¬telnet-server-x.x-xÊÇtelnet·þÎñ
а²×°»òÉý¼¶£º
rpm -Uvh telnet-x.x-x.rpm
rpm -Uvh telnet-server-x.x-x.rpm
Taball·½Ê½£º
3. ÅäÖòÎÊý
telnet serverµÄÅäÖÃÎļþΪ/etc/xinetd.d/telnet
ͨ³£µÄÅäÖÃÈçÏ£º
service telnet
{
disable = no #ÆôÓÃ
flags = REUSE #socket¿ÉÖØÓÃ
socket_type = stream #Á¬½Ó·½Ê½ÎªTCP
wait = no #Ϊÿ¸öÇëÇóÆô¶¯Ò»¸ö½ø³Ì
user = root #Æô¶¯·þÎñµÄÓû§Îªroot
server = /usr/sbin/in.telnetd #Òª¼¤»îµÄ½ø³Ì
log_on_failure += USERID #µÇ¼ʧ°Üʱ¼Ç¼µÇ¼Óû§Ãû
}
Èç¹ûÒªÅäÖÃÔÊÐíµÇ¼µÄ¿Í»§¶ËÁÐ±í£¬¼ÓÈë
only_from = 192.168.0.2 #Ö»ÔÊÐí192.168.0.2µÇ¼
Èç¹ûÒªÅäÖýûÖ¹µÇ¼µÄ¿Í»§¶ËÁÐ±í£¬¼ÓÈë
no_access = 192.168.0.{2,3,4} #½ûÖ¹192.168.0.2¡¢192.168.0.3¡¢192.168.0.4µÇ¼
Èç¹ûÒªÉèÖÿª·Åʱ¶Î£¬¼ÓÈë
access_times = 9:00-12:00 13:00-17:00 # ÿÌìÖ»ÓÐÕâÁ½¸öʱ¶Î¿ª·Å·þÎñ£¨ÎÒÃǵÄÉÏ°àʱ¼ä£ºP£©
Èç¹ûÄãÓÐÁ½¸öIPµØÖ·£¬Ò»¸öÊÇ˽ÍøµÄIPµØÖ·Èç192.168.0.2£¬Ò»¸öÊǹ«ÍøµÄIPµØÖ·Èç218.75.74.83£¬Èç¹ûÄãÏ£ÍûÓû§Ö»ÄÜ´Ó˽ÍøÀ´µÇ¼telnet·þÎñ£¬ÄÇô¼ÓÈë
bind = 192.168.0.2
¸÷ÅäÖÃÏî¾ßÌåµÄº¬ÒåºÍÓï·¨¿É²Î¿¼xinedÅäÖÃÎļþÊôÐÔ˵Ã÷£¨man xinetd.conf£©
4. ÅäÖö˿Ú
ÐÞ¸ÄservicesÎļþ
vi /etc/services
ÕÒµ½ÒÔÏÂÁ½¾ä
telnet 23/tcp
telnet 23/udp
Èç¹ûÇ°ÃæÓÐ#×Ö·û£¬¾ÍÈ¥µôËü¡£telnetµÄĬÈ϶˿ÚÊÇ23£¬Õâ¸ö¶Ë¿ÚÒ²ÊǺڿͶ˿ÚɨÃèµÄÖ÷Òª¶ÔÏó£¬Òò´Ë×îºÃ½«Õâ¸ö¶Ë¿ÚÐ޸ĵô£¬Ð޸ĵķ½·¨ºÜ¼òµ¥£¬¾ÍÊǽ«23Õâ¸öÊý×ÖÐ޸ĵô£¬¸Ä³É´óÒ»µãµÄÊý×Ö£¬±ÈÈç61123¡£×¢Ò⣬1024ÒÔϵĶ˿ںÅÊÇinternet±£ÁôµÄ¶Ë¿ÚºÅ£¬Òò´Ë×îºÃ²»ÒªÓ㬻¹Ó¦¸Ã×¢Òâ²»ÒªÓëÆäËü·þÎñµÄ¶Ë¿Ú³åÍ»¡£
5. Æô¶¯·þÎñ
service xinetd restart
6. ÑéÖ¤
ÏÖÔÚÀ´Ñé֤һϳɹû£º
telnet 127.0.0.1 £¨Èç¹ûÄãÐÞ¸ÄÁ˶˿ںţ¬ÔòÊäÈë telnet 127.0.0.1:¶Ë¿ÚºÅ£©
Èç¹û³öÏÖ
login:
Ôò±íʾtelnetÒѾÆô¶¯£¬¿ÉÒԵǼÁË£¬´ËʱÊäÈëÓû§ÃûÃÜÂë¾Í¿ÉÒԵǼ·þÎñÆ÷ÁË¡£×¢Ò⣬ΪÁË°²È«£¬telnetĬÈÏÊDz»ÔÊÐírootÓû§µÇ¼µÄ£¬ÒªÔÊÐírootÓû§µÇ¼£¬¿ÉÒÔÓÃÒÔÏ·½·¨£º
vi /etc/pam.d/login
ÔÚauth required pam_securetty.soÇ°¼ÓÉÏ#×¢Ê͵ô£¬»òÕßÒƳý/etc/securettyÎļþ
mv /etc/securetty /etc/securetty.bak
µ«ÊÇΪÁË°²È«£¬×îºÃ²»ÒªÕâÑù×ö£¬¸üºÃµÄ°ì·¨ÊÇÓÃÆÕͨÓû§µÇ¼£¬ÔÙÓÃsuÃüÁî»ñµÃrootȨÏÞ
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=663309
------
1. ¼ì²âSuSEµÄTelnet·þÎñÊÇ·ñÒÑ°²×°£¨Ä¬ÈÏ°²×°Ê±ÊDz»°²×°Telent-ServerµÄ¡££©
# chkconfig -list
ÔÚÁбíÖУ¬ÓÐÈçÏÂÏÔʾ£¬±íʾtelnet·þÎñÒÑ°²×°¡£
xinetd based services:
telnet: on
Èç¹ûδ°²×°telnet-server£¬ÔòÇëÔÚYaSTÖа²×°Èí¼þ°ü£¨telnet-serverÔÚCD2ÖУ©¡£
2. Æô¶¯telnet·þÎñ£º
#chkconfig telnet on
3. È·ÈÏ·þÎñÒÑÆô¶¯£º
# chkconfig -list
xinetd based services:
telnet: on
·þÎñÆô¶¯Ê±£¬ÏÔʾΪon¡£
4. ÐÞ¸ÄÅäÖÃÎļþftpusers£¬Ê¹root¿ÉÒÔµÇÈë
# cd /etc
# mv securetty securetty.bak
/etc # vi ftpusers
ÔÚrootÇ°¼ÓÉÏ×¢ÊÍ£¬ÒÔ±ãÈÃroot¿ÉÒÔµÇÈë¡£
#root
±£´æºóÍ˳ö¡£
5. Ð޸ĿÉͬʱÁ¬½ÓµÄtelnetÖÕ¶ËÊýÁ¿
# cd /etc
# vi xinetd.conf
ÐÞ¸ÄinstancesµÄÊýÁ¿£º
instances = 150
±£´æºóÍ˳ö¡£
6. ÖØÐÂÆô¶¯·þÎñ£º
# /etc/init.d/xinetd restart
Shutting down xinetd: done
Starting INET services. (xinetd) done
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=546060
----
SUSEĬÈϵķÀ»ðǽÉèÖÃΪ½ûÖ¹ËùÓÐÍâÀ´Áª½á¡£Èç¹ûÄãÏ뿪·Åij¸ö¶Ë¿ÚµÄ»°£¬¾ÍµÃÐ޸ķÀ»ðǽÉèÖÿª·ÅÕâ¸ö¶Ë¿Ú¡£±¾ÎĽéÉÜÁËÔõôÐÞ¸ÄSuSEµÄ·À»ðǽÉèÖÃÒÔ¿ª·Åijָ¶¨¶Ë¿Ú¡£
ÊÖ¶¯Ð޸ģº
#vi /etc/sysconfig/SuSEfirewall2
#TCP¶Ë¿ÚµÄÇé¿ö£º
FW_SERVICES_EXT_TCP = "6000"
#UDP¶Ë¿ÚµÄÇé¿ö£º
FW_SERVICES_EXT_UDP = "177"
·À»ðǽÉèÖõÄÉúЧ£º
#rcSuSEfirewall2 restart
--------
×ÛºÏÒÔÉÏ×ÊÁÏ°²×°Íê±Ï£¬±È½ÏÍíÁË£¬»¹Ã»ÓнøÐвâÊÔ£¬²»¹ý¸Ð̾²î²»¶àÁË£¬ºÙºÙ¡£
njham ÓÚ 2008-01-26 11:03:19·¢±í:
ÎÒµÄû°²×°Ö±½ÓÔÚÔÚÖÕ¶ËÀï¾ÍÄÜÓá£