yum安装telnet服务
yum安装telnet服务
1.查看有无安装telnet
[root@localhost ~]# rpm -qa |grep telnet
2.查看yum 源
[root@localhost ~]# yum list |grep telnet
telnet.x86_64 1:0.17-48.el6 @base
telnet-server.x86_64 1:0.17-48.el6 @base
[root@localhost ~]#
3.执行yum 安装
[root@localhost ~]# yum -y install telnet-server
4.查看
[root@localhost ~]# rpm -qa |grep telnet
telnet-0.17-48.el6.x86_64
telnet-server-0.17-48.el6.x86_64
[root@localhost ~]#
5.开启telnet服务并查看状态
[root@localhost ~]# /etc/init.d/xinetd start
Starting xinetd:
[root@localhost ~]# service xinedt status
xinedt: unrecognized service
[root@localhost ~]# service xinetd status
xinetd (pid 9636) is running...
[root@localhost ~]#
6.查看服务有没有安装上
[root@localhost ~]# chkconfig --list |grep telnet
telnet: on
[root@localhost ~]# chkconfig --list |grep xinted
[root@localhost ~]# chkconfig --list |grep xinetd
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
xinetd based services:
[root@localhost ~]#
7.查看telnet端口是否开启,telnet默认端口为23所以用以下命令可以查看
[root@localhost ~]# netstat -apn |grep 23
tcp 0 0192.168.1.52:23 192.168.1.5:4403 ESTABLISHED 9670/in.telnetd
tcp 0 0:::23 :::* LISTEN 9636/xinetd
unix 3 [] STREAM CONNECTED 11923 1288/master
[root@localhost ~]#
显示端口为 listenning 然后服务为xinetd
8.测试 可以使用本服务器测试也可以用客户端测试
这边是用客户端
这里有一点需要注意的是默认是不允许管理员登录的
所以创建新用户然后用新用户登录,创建的新用户可以在[root@localhost ~]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
vcsa:x:69:69:virtual console memoryowner:/dev:/sbin/nologin
saslauth:x:499:76:"Saslauthduser":/var/empty/saslauth:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
sshd:x:74:74:Privilege-separatedSSH:/var/empty/sshd:/sbin/nologin
zuzhao:x:500:500::/home/zuzhao:/bin/bash
apache:x:48:48:Apache:/var/www:/sbin/nologin
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
[root@localhost ~]#
中看到然后在登录
完成。
本文出自 “tigase安装与测试” 博客,请务必保留此出处http://jiazuzhao.blog.51cto.com/1123655/1885535