Linux系統(tǒng)telnet設(shè)置.doc_第1頁
Linux系統(tǒng)telnet設(shè)置.doc_第2頁
Linux系統(tǒng)telnet設(shè)置.doc_第3頁
Linux系統(tǒng)telnet設(shè)置.doc_第4頁
Linux系統(tǒng)telnet設(shè)置.doc_第5頁
已閱讀5頁,還剩4頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

一、telnet基礎(chǔ)知識(shí)telnet:提供telnet服務(wù),使用未加密的用戶/密碼組進(jìn)行驗(yàn)證,依附于xinetd服務(wù).文件位于/etc/xinetd.d/telnet.xinetd:因特網(wǎng)操作服務(wù)程序.提供類似于inetd+tcp_wrapper的功能,但是更加強(qiáng)大和安全,監(jiān)控網(wǎng)絡(luò)對(duì)各種它管理的服務(wù)的需求,并在要的時(shí)候啟動(dòng)相應(yīng)的服務(wù)程序.文件位于/etc/xinetd.d中。二、telnet服務(wù)安裝1、查看telnet rpm包1. rootrhel52/#rpm-qa|greptelnet 2. telnet-0.17-38.el5 3. telnet-server-0.17-38.el5=RHEL5CD#4 4. rootrhel52/#2、安裝telnet server rpm包1. rootrhel52work#rpm-ivhtelnet-server-0.17-38.el5.i386.rpm 2. warning:telnet-server-0.17-38.el5.i386.rpm:HeaderV3DSAsignature:NOKEY,keyID37017186 3. Preparing.#100% 4. packagetelnet-server-0.17-38.el5isalreadyinstalled 5. rootrhel52work#注:安裝完畢以后會(huì)在/etc/xinetd.d/中出現(xiàn)一個(gè)telnet配置文件 三、telnet服務(wù)檢測1、查看telnet服務(wù)1. rootrhel52/#chkconfig-list|greptelnet 2. telnet:off 3. rootrhel52/#2、開啟telnet服務(wù)1. rootrhel52/#chkconfigtelneton 2. 也可以用rootrhel52/#ntsysv開啟3、設(shè)置自動(dòng)啟動(dòng)1. rootrhel52/#chkconfig-level35telneton 2. rootrhel52/#chkconfig-list|greptelnet 3. telnet:on 4. rootrhel52/#四、telnet服務(wù)調(diào)試1、配置telnet文件1. rootrhel52/#vim/etc/xinetd.d/telnet 2. #default:on 3. #description:Thetelnetserverservestelnetsessions;ituses 4. #unencryptedusername/passwordpairsforauthentication. 5. servicetelnet 6. 7. disable=no=確認(rèn)是no 8. flags=REUSE9. socket_type=stream10. wait=no11. user=root12. server=/usr/sbin/in.telnetd 13. log_on_failure+=USERID 14. 2、注意/etc/xinetd.d/ekrb5-telnet 和 krb5-telnet兩個(gè)文件中的disable,稍后說明其作用. 五、telnet開啟root1、確認(rèn)/etc/pam.d/login中的pam_securetty.so行,并將其注釋掉(用#)1. rootrhel52/#vim/etc/pam.d/login 2. #%PAM-1.0 3. #authuser_unknown=ignoresuccess=okignoreignore=ignoredefault=badpam_securetty.so 4. authincludesystem-auth 5. accountrequiredpam_nologin.so 6. accountincludesystem-auth 7. passwordincludesystem-auth 8. #pam_selinux.socloseshouldbethefirstsessionrule 9. sessionrequiredpam_selinux.soclose 10. sessionincludesystem-auth 11. sessionrequiredpam_loginuid.so 12. sessionoptionalpam_console.so 13. #pam_selinux.soopenshouldonlybefollowedbysessionstobeexecutedinthe 14. usercontext 15. sessionrequiredpam_selinux.soopen 16. sessionoptionalpam_keyinit.soforcerevoke2、開通telnet控制臺(tái),在/etc/securetty文件中設(shè)定1. rootrhel52/#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六、telnet服務(wù)啟動(dòng)1. 因?yàn)閠elnet服務(wù)是由xinetd調(diào)用,所以只要重新啟動(dòng)xinetd即可 2. rootrhel52/#servicexinetdrestart 3. Stoppingxinetd:OK 4. Startingxinetd:OK 5. rootrhel52/#七、telnet服務(wù)測試1. MicrosoftWindows版本6.1.7100 2. 版權(quán)所有(c)2009MicrosoftCorporation.保留所有權(quán)利. 3. C:telnet20 4. 正在連接20. 5. RedHatEnterpriseLinuxServerrelease5(Tikanga) 6. Kernel2.6.18-8.el5onani686 7. login:root 8. Password: 9. Lastlogin:SatAug122:47:15from 10. rootrhel52#八、telnet端口更改1. 設(shè)定配置文件/etc/services 2. rootCentOS5/#vi/etc/services找到下面的兩行:1. telnet23/tcp 2. telnet23/udp九、telnet服務(wù)限制設(shè)定配置文件/etc/xinetd.d/telnet1. rootrhel52/#vim/etc/xinetd.d/telnet 2. access_time=20:00-24:00 3. #default:on 4. #description:Thetelnetserverservestelnetsessions;ituses 5. #unencryptedusername/passwordpairsforauthentication. 6. servicetelnet 7. 8. disable=no9. flags=REUSE10. socket_type=stream11. wait=no12. user=root13. server=/usr/sbin/in.telnetd 14. log_on_failure+=USERID 15. only_from=/16 16. 17. #bind=00 18. #only_from=/24 19. #no_access=0,90 20. #access_times=8:00-9:0020:00-23:00TFTP是用來下載遠(yuǎn)程文件的最簡單網(wǎng)絡(luò)協(xié)議,它其于UDP協(xié)議而實(shí)現(xiàn)。1,拿出系統(tǒng)關(guān)盤,安裝這2個(gè)軟件,一個(gè)是服務(wù)端,一個(gè)是客戶端,tftp-0.39-2.i386.rpmtftp-server-0.39-2.i386.rpm2,修改啟動(dòng)配置文件不管使用的是哪一種super-server,inetd或者xinetd,默認(rèn)情況下TFTP服務(wù)是禁用的,所以要修改文件來開啟服務(wù)。修改文件/etc/xinetd.d/tftp。主要是設(shè)置TFTP服務(wù)器的根目錄,開啟服務(wù)。修改后的配置文件如下:service tftp disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftp_root -c per_source = 11 cps = 100 2 flags = IPv4說明:其中處可以改為你的tftp-server的根目錄,參數(shù)-s指定chroot,-c指定了可以創(chuàng)建文件。3,創(chuàng)建tftp根目錄,關(guān)閉防火墻,啟動(dòng)tftp-server。mkdir /tftp_root#chmod -R 777 /tftp_root/etc/init.d/iptables stop /關(guān)閉防火墻service xinetd restart /重啟 xinetd 服務(wù)重啟xinetd服務(wù),因?yàn)門FTP服務(wù)受控與xinetd, xinetd是管服務(wù)的服務(wù),它是不開端口的。驗(yàn)證一下TFTP是否起來了:rootlocalhost tftp_root# netstat -nlpActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 :22 :* LISTEN 2828/sshdudp 0 0 :69 :* 10887/xinetd udp 0 0 :69 :* 10863/in.tftpd udp 0 0 :69 :* 10778/in.tftpd 可以看到69端口已經(jīng)打開,說明服務(wù)啟動(dòng)正常4,你可以登陸其他測試以下,tftp 54tftpget tftpput tftpq 安裝samba1,首先驗(yàn)證你的機(jī)器中是否已安裝sambarpm -qa|grep samba,如果出現(xiàn)samba-common-2.2.7a-7.9.0samba-client-2.2.7a-7.9.0samba-2.2.7a-7.9.0那么恭喜你,你已安裝好了samba,如果沒有以上那些東東,請(qǐng)安裝,安裝方法非常簡單,redhat linux 9.0第一張光盤里就有/cdrom/RedHat/RPMS/2.以下是我的周詳安裝過程把第一張光盤放進(jìn)光驅(qū),他會(huì)自動(dòng)掛接的,省得自己動(dòng)手mount了#cd /mnt/cdrom/RedHat/RPMS(注意大小寫字母,否則會(huì)出錯(cuò)的啊)#rpm -ivh samba-common-2.2.7a-7.9.0 (這個(gè)要先安裝,安裝的時(shí)候不一定要把后面的 samba-common-2.2.7a-7.9.0全部寫完,比如寫到samba-c的時(shí)候,多按幾次Tab鍵,非常省事的哦)#rpm -ivh samba-2.2.7a-7.9.0#rpm -ivh samba-client-2.2.7a-7.9.0(客戶端)3、方法在虛擬機(jī)中創(chuàng)建共享目錄,或者用已經(jīng)存在的目錄: #mkdir /public 為了確保拷文件沒問題,修改目錄權(quán)限: #chmod 777 /public 修改linux虛擬機(jī)中的/etc/samba/smb.conf文件, #vi /etc/samba/smb.conf 新增如下內(nèi)容: public path = /public read only = no public = yes 修改安全級(jí)別,如果對(duì)samba用戶知道很少,那么直接配置成共享級(jí)別,修改security后面的內(nèi)容為share: security = share 保存退出。 啟動(dòng)samba服務(wù): #service smb restart 檢查虛擬機(jī)ip地址: #ifconfig 看到ip地址后,在windows下,點(diǎn)擊“開始”“運(yùn)行”輸入“00”,再點(diǎn)擊確定,就能訪問虛擬機(jī)共享的public目錄往里寫文件了了。(上面的00為虛擬機(jī)的IP地址)如果對(duì)samba用戶了解的多一些,則為了更安全起見,將安全級(jí)別配置成user級(jí)別,比上述步驟

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論