如何在智能告警平台CA触发测试告警
706
2023-02-13
linux下telnet安装与使用
yum安装telnet
yum安装简单快速
1 | yum install telnet-server |
配置telnet
telnet是放在xinetd里,将disable改为yes,如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # vim /etc/xinetd.d/telnet # default: on # description: The telnet server serves telnet sessions; it uses \ # unencrypted username/password pairs for authentication. servicetelnet { 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这样的,否则跳过这一步
1 2 3 4 5 | # cat /etc/securetty | grep pts pts/0 pts/1 pts/2 pts/3 |
启动telnet
1 2 | # service xinetd start Starting xinetd: [ OK ] |
确认是否启动
1 2 | # netstat -lnt | grep :23 tcp 0 0:::23 :::* LISTEN |
创建普通用户
如果已经有用户了,那么可以跳过这一步
1 2 3 4 5 6 | # useradd # 创建用户 # passwd # 修改密码 Changing password foruser . Newpassword: Retype newpassword: passwd:all authentication tokens updated successfully. |
telnet连接测试
使用root登录
1 2 3 4 5 6 | CentOS release6.5(Final) Kernel3.15.4-x86_64-linode45 on an x86_64 login:root Password: Last login:Thu Feb1208:37:11from58.246.52.46 [root@li220-237~]# |
普通用户登录
1 2 3 4 5 6 7 8 9 10 | CentOS release6.5(Final) Kernel3.15.4-x86_64-linode45 on an x86_64 login: Password: $w 08:41:05up199days,21:57, 2users, load average:0.00,0.01,0.05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT pts/1 51.241.12.49 08:40 1.00s 0.00s 0.00sw root pts/0 51.241.12.49 08:27 1:37 0.01s 0.01s-bash $ |
发表评论
评论列表