自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Linux系統(tǒng)telnet服務(wù)設(shè)置大全

網(wǎng)絡(luò) 網(wǎng)絡(luò)管理
文章摘要:下面我們針對telnet服務(wù)在Linux系統(tǒng)中的一些設(shè)置問題進(jìn)行一下匯總。由于版本的不同,那么所需要注意的細(xì)節(jié)也不同。

關(guān)于Linux系統(tǒng),這次我們來講解一下telnet服務(wù)的相關(guān)內(nèi)容。那么對于Linux下的telnet設(shè)置,我們針對不同的版本以及相關(guān)的一些問題來進(jìn)行一下講解。那么具體內(nèi)容請大家參考正文。

一、telnet基礎(chǔ)知識

telnet:提供telnet服務(wù),使用未加密的用戶/密碼組進(jìn)行驗(yàn)證,依附于xinetd服務(wù).文件位于/etc/xinetd.d/telnet.

krb5-telnet:提供telnet服務(wù),允許普通的telnet登陸,默認(rèn)是不允許root用戶登錄,使用kerberos5驗(yàn)證 ,依附于xinetd服務(wù).文件位于/etc/xinetd.d/krb5-telnet.

ekrb5-telnet:提供加密的telnet服務(wù),但是必須要ekrb5的加密服務(wù)器.文件位于/etc/xinetd.d/ekrb5-telnet.

xinetd:因特網(wǎng)操作服務(wù)程序.提供類似于inetd+tcp_wrapper的功能,但是更加強(qiáng)大和安全,監(jiān)控網(wǎng)絡(luò)對各種它管理的服務(wù)的需求,并在要的時(shí)候啟動相應(yīng)的服務(wù)程序.文件位于/etc/xinetd.d中。

二、telnet服務(wù)安裝

1、查看telnet rpm包

  1. [root@rhel52 /]# rpm -qa | grep telnet  
  2. telnet-0.17-38.el5  
  3. telnet-server-0.17-38.el5       《=RHEL5CD#4  
  4. [root@rhel52 /]# 

2、安裝telnet server rpm包

  1. [root@rhel52 work]# rpm -ivh telnet-server-0.17-38.el5.i386.rpm  
  2. warning: telnet-server-0.17-38.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186  
  3. Preparing...                ########################################### [100%]  
  4. package telnet-server-0.17-38.el5 is already installed  
  5. [root@rhel52 work]# 

注:安裝完畢以后會在/etc/xinetd.d/中出現(xiàn)一個(gè)telnet配置文件#p#

三、telnet服務(wù)檢測

1、查看telnet服務(wù)

  1. [root@rhel52 /]# chkconfig --list | grep telnet  
  2. ekrb5-telnet:     off  
  3. krb5-telnet:      off  
  4. telnet:           off  
  5. [root@rhel52 /]# 

2、開啟telnet服務(wù)

  1. [root@rhel52 /]# chkconfig telnet on  
  2. 也可以用[root@rhel52 /]# ntsysv開啟 

3、設(shè)置自動啟動

  1. [root@rhel52 /]# chkconfig --level 35 telnet on  
  2. [root@rhel52 /]# chkconfig --list | grep telnet  
  3. ekrb5-telnet:     off  
  4. krb5-telnet:      off  
  5. telnet:           on  
  6. [root@rhel52 /]# 

四、telnet服務(wù)調(diào)試

1、配置telnet文件

  1. [root@rhel52 /]# vim /etc/xinetd.d/telnet  
  2. # default: on  
  3. # description: The telnet server serves telnet sessions; it uses \  
  4. #       unencrypted username/password pairs for authentication.  
  5. service telnet  
  6. {  
  7. disable = no    《=確認(rèn)是no  
  8. flags           = REUSE 
  9. socket_type     = stream 
  10. wait            = no 
  11. user            = root 
  12. server          = /usr/sbin/in.telnetd  
  13. log_on_failure  += USERID  

2、注意/etc/xinetd.d/ekrb5-telnet 和 krb5-telnet兩個(gè)文件中的disable,稍后說明其作用.#p#

五、telnet開啟root

1、確認(rèn)/etc/pam.d/login中的pam_securetty.so行,并將其注釋掉"#"

  1. [root@rhel52 /]# vim /etc/pam.d/login  
  2. #%PAM-1.0  
  3. #auth [user_unknown=ignore success=ok ignoreignore=ignore default=bad] pam_securetty.so  
  4. auth       include      system-auth  
  5. account    required     pam_nologin.so  
  6. account    include      system-auth  
  7. password   include      system-auth  
  8. # pam_selinux.so close should be the first session rule  
  9. session    required     pam_selinux.so close  
  10. session    include      system-auth  
  11. session    required     pam_loginuid.so  
  12. session    optional     pam_console.so  
  13. # pam_selinux.so open should only be followed by sessions to be executed in the  
  14. user context  
  15. session    required     pam_selinux.so open  
  16. session    optional     pam_keyinit.so force revoke 

2、開通telnet控制臺,在/etc/securetty文件中設(shè)定

  1. [root@rhel52 /]# vim /etc/securetty  
  2. console  
  3. vc/1  
  4. vc/2  
  5. vc/3  
  6. tty1  
  7. tty2  
  8. tty3  
  9. tty4  
  10. tty5  
  11. ...  
  12. pts/1  
  13. pts/2  
  14. pts/3  
  15. pts/4  
  16. pts/5  
  17. 在文件后面追加"pts/1....pts/n" 

 #p#

六、telnet服務(wù)啟動

  1. 因?yàn)閠elnet服務(wù)是由xinetd調(diào)用,所以只要重新啟動xinetd即可  
  2. [root@rhel52 /]# service xinetd restart  
  3. Stopping xinetd:                                  [  OK  ]  
  4. Starting xinetd:                                  [  OK  ]  
  5. [root@rhel52 /]# 

七、telnet服務(wù)測試

  1. Microsoft Windows [版本 6.1.7100]  
  2. 版權(quán)所有 (c) 2009 Microsoft Corporation.保留所有權(quán)利.  
  3. C:\>telnet 192.168.238.220  
  4. 正在連接192.168.238.220...  
  5. Red Hat Enterprise Linux Server release 5 (Tikanga)  
  6. Kernel 2.6.18-8.el5 on an i686  
  7. login: root  
  8. Password:  
  9. Last login: Sat Aug  1 22:47:15 from 192.168.238.1  
  10. [root@rhel52 ~]# 

八、telnet端口更改

  1. 設(shè)定配置文件/etc/services  
  2. [root@CentOS5 /]#vi /etc/services 

找到下面的兩行:

  1. telnet          23/tcp  
  2. telnet          23/udp  

#p#

九、telnet服務(wù)限制

設(shè)定配置文件/etc/xinetd.d/telnet

  1. [root@rhel52 /]# vim /etc/xinetd.d/telnet  
  2. access_time     = 20:00-24:00  
  3. # default: on  
  4. # description: The telnet server serves telnet sessions; it uses \  
  5. #       unencrypted username/password pairs for authentication.  
  6. service telnet  
  7. {  
  8. disable = no 
  9. flags           = REUSE 
  10. socket_type     = stream 
  11. wait            = no 
  12. user            = root 
  13. server          = /usr/sbin/in.telnetd  
  14. log_on_failure  += USERID  
  15. only_from       = 192.168.0.0/16  
  16. }  
  17. #bind           = 192.168.0.100  
  18. #only_from      = 192.168.0.0/24  
  19. #no_access      = 192.168.0.{80,90}  
  20. #access_times   = 8:00-9:00 20:00-23:00 

十、配置文件krb5-telnet

文件所在位置 /etc/xinetd.d/krb5-telnet

其實(shí)rhel5已經(jīng)裝了krb5-telnet,那么就可以啟用這個(gè)服務(wù)來達(dá)到開啟telnet的目的.不用再安裝telnet-server這個(gè)軟件包了.可以使用Kerberos 5來進(jìn)行認(rèn)證.

1、開啟krb5-telnet服務(wù).

  1. [root@rhel52 /]# vim /etc/xinetd.d/krb5-telnet  
  2. 將"disabledisable = yes"  改為"disable = no" 

2、啟動服務(wù)

  1. [root@rhel52 /]# service xinetd restart 

十一、配置文件ekrb5-telnet

文件所在位置 /etc/xinetd.d/ekrb5-telnet

ekrb5- telnet可以用來提供加密的telnet服務(wù).如果啟用了ekrb5-telnet服務(wù),但是又沒有Kerberos服務(wù)器的話,那么在進(jìn)行 telnet登錄時(shí),總是會報(bào)"Unencrypted connection refused. Goodbye.(未加密的連接,拒絕服務(wù))"這個(gè)錯(cuò)誤.

1、開啟ekrb5-telnet服務(wù).

[root@rhel52 /]# vim /etc/xinetd.d/ekrb5-telnet
將"disable = yes"  改為"disable = no"

2、啟動服務(wù)

[root@rhel52 /]# vim service xinetd restart
注:使用Kerberos 5來認(rèn)證和加密telnet會話前,需要先搭建一個(gè)Kerberos服務(wù)器.

 #p#

十二、telnet服務(wù)登陸錯(cuò)誤解析

①錯(cuò)誤信息:

  1. Cannot resolve network address for KDC in requested realm while getting initial credentials 

當(dāng)出現(xiàn)如上信息時(shí),請檢查/etc/xinetd.d/krb5-telnet,并將"disable = no"改成yes

  1. [root@rhel52 /]# vim /etc/xinetd.d/krb5-telnet  
  2. # default: off  
  3. # description: The kerberized telnet server accepts normal telnet sessions, \  
  4. #              but can also use Kerberos 5 authentication.  
  5. service telnet  
  6. {  
  7. flags           = REUSE 
  8. socket_type     = stream 
  9. wait            = no 
  10. user            = root 
  11. server          = /usr/kerberos/sbin/telnetd  
  12. log_on_failure  += USERID  
  13. disable         = no    <- no改成yes  

②錯(cuò)誤信息:

  1. Unencrypted connection refused. Goodbye. 

遺失對主機(jī)的連接.當(dāng)出現(xiàn)如上信息時(shí),請檢查/etc/xinetd.d/ekrb5-telnet,并將"disable = no"改成yes

  1. [root@rhel52 /]# vim /etc/xinetd.d/ekrb5-telnet  
  2. # default: off  
  3. # description: The kerberized telnet server accepts only telnet sessions, \  
  4. #              which use Kerberos 5 authentication and encryption.  
  5. service telnet  
  6. {  
  7. flags           = REUSE 
  8. socket_type     = stream 
  9. wait            = no 
  10. user            = root 
  11. server          = /usr/kerberos/sbin/telnetd  
  12. server_args     = -e  
  13. log_on_failure  += USERID  
  14. disable         = no    <- no改成yes  

③錯(cuò)誤信息:

  1. getnameinfo: localhost: Success  
  2. Temporary failure in name resolution: Illegal seek 

當(dāng)出現(xiàn)如上信息時(shí),請檢查/etc/hosts,并將客戶端的地址和主機(jī)名寫進(jìn)去.

  1. [root@rhel52 /]# vim /etc/hosts  
  2. # Do not remove the following line, or various programs  
  3. # that require network functionality will fail.  
  4. 127.0.0.1               localhost.localdomain   localhost       rhel52  
  5. #::1                    rhel52                  localhost6  
  6. 192.168.238.220         rhel52  
  7. 192.168.0.100           win-gk18e84nu08 

本文來自CSDN博客,轉(zhuǎn)載請標(biāo)明出處:http://blog.csdn.net/zhangxue198501/archive/2009/12/15/5011479.aspx

責(zé)任編輯:佟健 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-07-16 14:31:11

Linux Telne

2010-07-17 01:20:00

Telnet服務(wù)

2010-07-22 12:15:59

Batch Telne

2009-10-14 09:38:45

linux telne服務(wù)開啟linux

2009-06-29 08:38:14

Linux操作系統(tǒng)

2009-07-03 06:55:33

Linux

2010-07-19 14:00:30

Telnet服務(wù)

2010-07-19 11:50:44

Linux Telne

2009-11-26 15:41:02

SUSE LINUX系

2010-07-23 10:29:54

Win2000 Tel

2010-07-20 15:28:34

2010-07-15 10:37:19

Win2000 Tel

2010-07-21 09:28:46

Ubuntu Linu

2010-07-17 01:12:31

Telnet服務(wù)

2010-07-15 13:27:07

Linux telne

2010-07-21 16:04:26

telnet服務(wù)器

2010-07-26 13:44:33

Ubuntu teln

2009-12-01 13:35:39

Telnet服務(wù)

2010-07-21 09:46:39

SuSE Telnet

2010-07-15 10:04:15

telnet登錄
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號