Linux telnet檢測rpm包是否安裝OS:RedHat9
對大家推薦很好使用的Linux telnet系統(tǒng),像讓大家對Linux telnet系統(tǒng)有所了解,然后對Linux telnet系統(tǒng)全面講解介紹,希望對大家有用今天公司有個同事弄了個Red Hat Enterprise 5裝,系統(tǒng)裝好后,發(fā)現(xiàn)Linux telnet不能用,ssh是可以的。搞了好久,才給搞定,結(jié)合以前摘下的關(guān)于這方面的資料,參考如下:
1。概述
Linux提供服務是由運行在后臺的守護程序(daemon)來執(zhí)行的。守護進程的工作就是打開1個端口(port),等待(listen)進入的連接。在C/S模式中,如果客戶提請了1個連接,守護進程就創(chuàng)建(fork)子進程來響應這個連接,而父進程繼續(xù)監(jiān)聽其他服務的請求。
但 是,對于Linux telnet所提供的每1個服務,如果都必須運行1個監(jiān)聽某個端口連接發(fā)生的守護程序,那么通常意味著系統(tǒng)資源的浪費。為此,引入“擴展的網(wǎng)絡守護進程服 務程序”xinetd(xinetd internet daemon)。Linux telnet服務也是由xinetd守護的。
2。檢測Linux telnet、Linux telnet-server的rpm包是否安裝OS:RedHat9
- [root@localhost root]#rpm -qa Linux telnet
- Linux telnet-0.17-25
- //Linux telnet*.rpm是默認安裝的//
- [root@localhost root]#rpm -qa Linux telnet-server空
- //Linux telnet*.rpm是默認沒有安裝的//
3。安裝Linux telnet-server
第3張盤上有Linux telnet-server-0.17-25.i386.rpm
[root@localhost root]#rpm -ivh Linux telnet-server*.i386.rpm --這個軟件包依賴于xinet這個包。
4。修改Linux telnet服務配置文件
- vi /etc/xinetd.d/Linux telnet
- service Linux telnet
- {
- disable = yes
- flags = REUSE
- socket_type = stream
- wait = no
- user = root
- server = /usr/sbin/in.Linux telnetd
- log_on_failure += USERID
- }
將disable=yes行前加#,或者改為disable=noPS:安裝Linux telnet-server后,系統(tǒng)才有文件/usr/sbin/in.Linux telnetd
5。重新啟動xinetd守護進程
由于Linux telnet服務也是由xinetd守護的,所以安裝完Linux telnet-server,要啟動Linux telnet服務就必須重新啟動xinetd[root@localhost root]#service xinetd restart或[root@localhost root]#/etc/init.d/xinetd restart
6。關(guān)閉系統(tǒng)的防火墻,
如果不能修改,則先修改下用戶認證方式再試試(setup -> Authentication configuration)
linux系統(tǒng)默認的防火墻是“high”命令行界面CLI:[root@localhost root]# setup選擇:“firewall configuration”選擇:security level——“no firewall”
7。設置root用戶可以Linux telnet主機(生產(chǎn)環(huán)境下不建議這樣)
# vi /etc/securetty 添加pts/0,要控制root同時Linux telnet數(shù)量,就添加多少個pts/x,其中x為0-255-...的數(shù)字。示例如下:
# cat /etc/securetty
console
vc/1
vc/2
vc/3
vc/4
vc/5
tty1
tty2
tty3
tty4
tty5
tty6
pts/0
pts/1
pts/2
pts/3
8。測試
- c:> Linux telnet IP
- Trying...
- Connected to IP
- Escape character is '^]'.
- Red Hat Enterprise Linux Server release 5 (Tikanga)
- Kernel 2.6.18-8.el5 on an i686
- login:
9。Linux telnet默認開機啟動
1)。命令ntsysv
找到Linux telnet,用空格鍵激活(*)服務
2)。命令chkconfig
chkconfig --add Linux telnet
chkconfig Linux telnet on
3)。圖形用戶界面GUI
redhat-conhat-config-services
或“主菜單”——“系統(tǒng)設置”——“服務器設置”——“服務”
PS:由于Linux telnet登陸時是明文傳送密碼,所以不安全,建議使用ssh(secure shell)替代!windows下一般用F-Secure SSH ,putty SSH
10。Trouble Shooting
(1).我在我機子上輸入 Linux telnet 192.168.1.18 (裝有Fedora Core 6 系統(tǒng)的機器)dos提示:Unencrypted connection refused.Goodbye.失去了跟主機的連接解決參考:"Unencrypted connection refused,Goodbye"解決辦法:因為開啟的Linux telnet server為/etc/xinetd.d/ekrb5-Linux telnet所以修改ekrb5-Linux telnet項目disable=yes即可.重啟服務service inetd restart即可.
(2).red hat linux enterprise 5 在從別的機上Linux telnet 過去時出現(xiàn)如下錯誤:(發(fā)出命令為: Linux telnet 10.x.x.x)getnameinfo: localhost: SuccessTemporary failure in name resolution: Illegal seek失去了跟主機的連接。
網(wǎng)上說只要在你的red hat linux enterprise 5的host文件中增加Linux telnet客戶端的地址,例如10.200.1.130 clientmachine,但是加了也不行,解決參考如下:分析原因是red hat 5的用戶認證鑒權(quán)方式比較嚴格,且也不能修改Firewall 的設置,只要把 Authentication configuration 里的一些選項去掉便可。# setup 選擇 Authentication configuration 去掉一些認證方式,然后再修改Firewall configuration里設置。
【編輯推薦】