【linux命令】Centos 6.5 linux系统下telnet如何安装与使用

内容摘要
1,yum安装telnet
yum install telnet–server -y


2,配置telnet

telnet是放在xinetd里,将disable改为no,否则没法用。如下:
# vim /etc/xinetd.d/telnet
# default: on
# des
文章正文

1,yum安装telnet

yum install telnet–server  -y 

telnet是放在xinetd里,将disable改为no,否则没法用。如下:

# 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         = no # 从yes改为no
}

 如果需要使用root使用telnet登录,加上pts/0、pts1这样的,否则跳过这一步

# cat /etc/securetty  | grep pts
pts/0
pts/1
pts/2
pts/3

启动telnet,然后netstat -tln | grep 23看下,如果有监听,说明安装对了。另外注意iptables放行23端口,这里就不多写了。

[[email protected] ~]# service xinetd start
正在启动 xinetd:                                          [确定]
# useradd 21yunwei# 创建用户
# passwd 21yunwei# 修改密码
Changing password for user ttlsa.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

 

3,telnet连接测试

使用root登录

CentOS release 6.5 (Final)
Kernel 2.6.32-431.23.3.el6.i686 on an i686
login: root
Password:
Last login: Mon Mar 6 22:08:28 from 218.88.70.76
Welcome to aliyun Elastic Compute Service!

[[email protected] ~]#

普通用户登录

CentOS release 6.5 (Final)
Kernel 2.6.32-431.23.3.el6.i686 on an i686
login: 21yunwei
Password:
Welcome to aliyun Elastic Compute Service!

[[email protected] ~]$ w
 22:10:41 up 4 days, 9:50, 3 users, load average: 0.01, 0.01, 0.00
USER TTY FROM [email protected] IDLE JCPU PCPU WHAT

 

 

代码注释
[!--zhushi--]

作者:喵哥笔记

IDC笔记

学的不仅是技术,更是梦想!