linux下安裝Telnet服務器

一般情況Telnet服務在linux下默認是沒有安裝的,需要手動安裝,因爲telnet是依賴於超級守護進程的進程,而依賴於超級守護進程的進程一般都會放置在/etc/xinetd.d/這個目錄下,獨立的進程一般放置到/etc/init.d/rc.d/這個目錄下。

安裝步驟:

1、掛載光盤鏡像

[root@localhost ~]#  mount /dev/cdrom /mnt

mount: block device /dev/cdrom is write-protected, mounting read-only

2、進入掛載到/mnt下的Server目錄中

[root@localhost ~]# cd /mnt/Server/

3、安裝telnet-server軟件包,該軟件包爲telnet服務器版軟件包

[root@localhost Server]# rpm -ivh telnet-server-0.17-39.el5.i386.rpm

4、配置telnet(很簡單)

[root@localhost Server]# vim /etc/xinetd.d/telnet 

# default: on

# description: The telnet server serves telnet sessions; it uses \

#       unencrypted username/password pairs for authentication.

service telnet

{

        flags           = REUSE

        socket_type     = stream

        wait            = no

        user            = root

        server          = /usr/sbin/in.telnetd

        log_on_failure  += USERID

        disable         = yes

}

只需要要上面disable=yes改爲=no即可,這裏當爲yes時表示telnet服務不會喚醒,如果有其他機器telnet該服務器後會無法連接,改爲no表示喚醒telnet服務

5、重啓xinetd服務

[root@localhost ~]# service xinetd restart


注:當有其他機器telnet該機器時是不能使用root用戶進行驗證的,這時候需要建立一個普通賬戶,通過普通賬戶登錄然後可以切換到root用戶

6、創建一個普通賬戶並設置密碼

[root@localhost ~]# useradd test

[root@localhost ~]# passwd test

做到上面結束後telnet服務器已經配置完成,這時候需要找一臺客服端來進行測試即可

測試:

Xshell:\> telnet 192.168.241.100

login: test

Password: 

Login incorrect


login: test

Password: 

Last login: Thu May 22 21:51:26 on tty3

[test@localhost ~]$     看到這裏表示已經telnet連接上了 這時候可以切換成root的用戶,使用

su -  或者su - root即可


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章