Centos 6.5 linux系统下telnet如何安装与使用 – 21运维
通知: .-...

Centos 6.5 linux系统下telnet如何安装与使用

linux 21运维 4886浏览 0评论

linux目前管理方式很多,比如常用的xshell,putty以及pietty等工具,已经没什么人用telnet。 zabbix有一个监控需要telnet做操作,发现默认没有装,特此网上搜索了点资料安装telnet并写成文章,特此笔记。

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端口,这里就不多写了。

[root@Master ~]# 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!

[root@Master ~]#

普通用户登录

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!

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

 

 

转载请注明:21运维 » Centos 6.5 linux系统下telnet如何安装与使用

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址