zoukankan      html  css  js  c++  java
  • Linux 系统Telnet服务

    Linux 系统Telnet服务

      telnet与ssh相比,安全性能并不高,但是在ssh版本升级或者其他的情况下还是需要开启这一项服务。linux提供服务是由运行在后台的守护进程daemon来执行的,telnet服务是由xinetd守护的。

      RedHat系统:

      开启telnet服务:

      1、检查telnet是否已经安装。

      2、查看telnet服务是否开启,

      命令:chkconfig --list | grep telnet

      3、开启telnet服务

      方法一:vi /etc/xinetd.d/telnet

         vi /etc/xinetd.d/telnet

         service telnet

        {

        disable = yes

        flags = REUSE

        socket_type = stream

        wait = no

        user = root

        server = /usr/sbin/in.telnetd

        log_on_failure += USERID

    }

        将disable=yes行前加#,或者改为disable=no

      4、重新启动xinetd守护进程

      由于telnet服务也是由xinetd守护的,所以安装完telnet-server,要启动telnet服务就必须重新启动xinetd

    [root@centos-64-min xinetd.d]# service xinetd restart

      5、关闭防火墙

    1) 重启后生效 
    开启: chkconfig iptables on 
    关闭: chkconfig iptables off 

    2) 即时生效,重启后失效 
    开启: service iptables start 
    关闭: service iptables stop 

      6、如果想允许以root身份登录telnet

      vi /etc/pam.d/login

    在 auth required /lib/security/pam_securetty.so 这行前加 # ,即把这行注释掉就行

    关闭telnet服务

    (1)法一:vi /etc/xinetd.d/telnet 将distable = no 改成 disable = yes

        法二:chkconfig telnet off 如果需要设置telent服务不为开机自启动,使用命令chkconfig --del telnet

    (2)使用命令service xinetd restart或者/etc/init.d/xinetd restart是更改生效

     删除telnet-server包:RPM -e telnet-server --nodeps      注释23端口: vi /etc/service.

     

  • 相关阅读:
    server.Execute 执行子请求时出错
    mybatis逆向工程
    上传及下载github项目
    基于tess4j的图片文字提取
    myeclipse中更改默认jdk版本出错( Target is not a JDK root. System library was not found)
    SSM整合环境搭建demo
    AMD CPU环境下使用android studio,eclipse的Genymotion插件
    Android Studio电脑不支持HAXM的解决办法
    完整使用JDBC访问数据库
    springMVC保存数据到mysql数据库中文乱码问题解决方法
  • 原文地址:https://www.cnblogs.com/King-Penguin/p/5229378.html
Copyright © 2011-2022 走看看