zoukankan      html  css  js  c++  java
  • CentOS 7安装Telnet服务进行远程管理

    1. 查看是否安装Telnet服务

      [root@localhost ~]# rpm -qa|grep telnet-server

    2. 安装 telnet-server

      [root@localhost ~]# yum install telnet-server

    3. 再次查看是否安装Telnet服务

      [root@localhost ~]# rpm -qa |grep telnet-server

        telnet-server-0.17-64.el7.x86_64  //出现这个说明已经安装了

    4. 查看是否安装 xinetd 服务

      //原因:telnet服务不是独立的服务,在xinetd服务下,由xinetd服务管理

      [root@localhost xinetd.d]# rpm -qa xinetd  //没反应就是没有安装

    5. 安装 xinetd 服务

      [root@localhost xinetd.d]# yum install xinetd

    6. 将xinetd服务和telnet服务设置为开机自启动

      [root@localhost xinetd.d]# systemctl enable xinetd.service

      [root@localhost xinetd.d]# systemctl enable telnet.socket

        Created symlink from /etc/systemd/system/sockets.target.wants/telnet.socket to /usr/lib/systemd/system/telnet.socket.  //说明开机自启添加 成功

    7. 启动 xinetd 和 telnet 服务

      [root@localhost xinetd.d]# systemctl start xinetd.service

      [root@localhost xinetd.d]# systemctl start telnet.socket

    8. 查看xinetd服务和telnet服务的状态(非必须步骤)

      [root@localhost xinetd.d]# systemctl status xinetd.service

      

       [root@localhost xinetd.d]# systemctl status telnet.socket

      

    9. 开启root登入,通过关闭安全的方法实现

      [root@localhost xinetd.d]# cd /etc/

      [root@localhost etc]# ls secure*

        securetty

      [root@localhost etc]# mv securetty securetty.bak

      注:也可以在securetty文件的末尾加上pts/0  pts/1的方法开启root登录,这样就不用关闭安全了

    10. 配置防火墙规则

      [root@localhost etc]# firewall-cmd --permanent --add-port=23/tcp      //开放23端口

      [root@localhost etc]# firewall-cmd --reload    //重新加载防火墙,使改动生效

    11. 现在可以通过Telnet工具进行远程登录管理了

  • 相关阅读:
    金融系列7《动态数据认证》
    PHP异常处理详解
    C语言中的宏定义
    PHP SOCKET编程
    yii实现级联下拉菜单
    AR的一些常见的操作
    IP地址的三种表示格式及在Socket编程中的应用
    时间管理
    socket阻塞与非阻塞,同步与异步、I/O模型
    程序人生 PHP工程师
  • 原文地址:https://www.cnblogs.com/xiykj/p/14929862.html
Copyright © 2011-2022 走看看