Telnet服務安裝及配置

來源:互聯網
上載者:User

標籤:

安裝Telnet服務:

[[email protected] ~]# yum install telnet-server -y

Installing : 2:xinetd-2.3.14-40.el6.x86_64    

Installing : 1:telnet-server-0.17-48.el6.x86_64

/etc/xinetd.d/telnet    //子設定檔

/usr/sbin/in.telnetd   

/usr/share/man/man5/issue.net.5.gz

/usr/share/man/man8/in.telnetd.8.gz

/usr/share/man/man8/telnetd.8.gz

查看xinetd服務是否安裝

[[email protected] ~]# rpm -ql xinetd

/etc/rc.d/init.d/xinetd     //啟動指令碼

/etc/xinetd.conf            //主設定檔

/usr/sbin/xinetd            //二進位命令

-----------------------------------------------------------------------------------------------------

[[email protected] ~]# cat /etc/xinetd.conf |grep -v ^#

defaults {    

  log_type    = SYSLOG daemon info //日誌類型,支援

  rsyslog     log_on_failure  = HOST          //失敗日誌,記錄用戶端的ip地址   

  log_on_success  = PID HOST DURATION EXIT    //成功日誌,記錄用戶端的pid和ip

  cps     = 50 10             //每秒50個連結,如果超過限制,則等待10s再連結   

  instances   = 50        //最大串連數    

  per_source  = 10        //每個ip地址最多串連數

  v6only      = no        //不使用ipv6

  groups      = yes    

  umask       = 002

}

includedir /etc/xinetd.d    //包含的目錄

[[email protected] ~]# cat /etc/xinetd.d/telnet

service telnet {

    flags   = REUSE    

    socket_type = stream       //socket類型tcp協議

    wait   = no    //不等待    

    user  = root  //以root身份去運行    

    server  = /usr/sbin/in.telnetd   

    log_on_failure  += USERID    

    disable  = yes   //關閉服務

}

修改設定檔

vim /etc/xinetd.d/telnet

只修改這一行

disabled = no

啟動服務

[[email protected] ~]# /etc/init.d/xinetd start

或者

[[email protected] ~]# service xinetd start

[[email protected] ~]# /etc/init.d/xinetd status

如果用戶端telnet 串連不上查看連接埠是否被佔用

[[email protected] ~]# netstat -alntp|grep 23

預設是不允許串連root使用者的

[[email protected] ~]# telnet 192.168.8.132   

Trying 192.168.8.132...    

Connected to 192.168.8.132.  

Escape character is ‘^]‘.  CentOS release 6.7 (Final)  

Kernel 2.6.32-573.el6.x86_64 on an x86_64    

login: root    

Password:    

Login incorrect

只允許某個網段的人串連,如:192.168.0.0/24 可以 man 5 xinetd.conf

修改設定檔

vim /etc/xinetd.d/telnet

only_from = 192.168.0.254

可以以連接埠號碼來訪問

[[email protected] ~]# telnet 192.168.8.132 23

======================================================================

windows下cmd終端訪問Telnet 解決Telnet不是內部命令,

開啟控制台--->程式和功能----->開啟或關閉Windows功能----->將Telnet用戶端的勾上,即可

win+r------>cmd----->telnet 192.168.8.132 23 預設不允許使用root使用者訪問

輸入使用者名稱和密碼即可訪問

Telnet服務安裝及配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.