• Debian Linux操作系统下启动Telnet服务


    http://linux.ccidnet.com/art/9513/20070706/1136933_1.html

    Root@2[/]# apt-get install xinetd

    root@2[/]# apt-get install telnetd

    root@2[/]# apt-get install telnet

    新建一个文件/etc/xinetd.d/telnet,内容如下,并保存

    root@2[/]# nano -w /etc/xinetd.d/telnet
    # default: on
    
    # description: The telnet server serves telnet sessions; it uses \
    
    #       unencrypted username/password pairs for authentication.
    
    service telnet
    
    {
    
            disable = no
    
            flags           = REUSE
    
            socket_type     = stream
    
            wait            = no
    
            user            = root
    
            server          = /usr/sbin/in.telnetd
    
            server_args     = -h
    
            log_on_failure  += USERID
    
    
    
    }

    从上面我们可以看到我们已经连接成功了,但是使用root连接的时候会失败,因为默认的安全设置是限制root用户使用telnet连接主机的

    本来因为telnet是明文传输的,所以处于安全考虑才限制了root从telnet登陆,如果你需要使用,那么如下修改

    root@2[/]# nano /etc/pam.d/login

    #

    # The PAM configuration file for the Shadow `login' service

    #

    # NOTE: If you use a session module (such as kerberos or NIS+)

    # that retains persistent credentials (like key caches, etc), you

    # need to enable the `CLOSE_SESSIONS' option in /etc/login.defs

    # in order for login to stay around until after logout to call

    # pam_close_session() and cleanup.

    #

    # Outputs an issue file prior to each login prompt (Replaces the

    # ISSUE_FILE option from login.defs). Uncomment for use

    # auth required pam_issue.so issue=/etc/issue

    # Disallows root logins except on tty's listed in /etc/securetty

    # (Replaces the `CONSOLE' setting from login.defs)

    #把下面在行注释掉

    # auth requisite pam_securetty.so

    # Disallows other than root logins when /etc/nologin exists

    # (Replaces the `NOLOGINS_FILE' option from login.defs)

    auth requisite pam_nologin.so

    # This module parses /etc/environment (the standard for setting

    # environ vars) and also allows you to use an extended config

    # file /etc/security/pam_env.conf.

    # (Replaces the `ENVIRON_FILE' setting from login.defs)

    auth required pam_env.so

    # Standard Un*x authentication. The "nullok" line allows passwordless

    # accounts.

    @include common-auth

    # This allows certain extra groups to be granted to a user

    # based on things like time of day, tty, service, and user.

    # Please uncomment and edit /etc/security/group.conf if you

    # wish to use this.

    # (Replaces the `CONSOLE_GROUPS' option in login.defs)

    # auth optional pam_group.so

    # Uncomment and edit /etc/security/time.conf if you n

    好,现在一个telnet我们就在debian下面架设好了,当然最后一步本人不建议你做

    因为telnet是内镶在xinetd这个服务里面的,所以如果你要启动或者是要停止该服务就要

    root@2[/]# /etc/init.d/xinetd

    force-reload reload restart start stop

  • 相关阅读:
    HDOJ 5347 MZL's chemistry 【打表】
    自定义轮播图插件
    Twitter Bootstrap:前端框架利器
    左边定宽,右边自适应两列布局
    JS 断点调试心得
    关于将多个json对象添加到数组中的测试
    普通选项卡+自动播放功能+向前/向后按钮 原生js
    线程队列、事件以及协程
    GIL锁、进程池与线程池、同步异步
    JoinableQueue类与线程
  • 原文地址:https://www.cnblogs.com/leaven/p/1710318.html
Copyright © 2020-2023  润新知