zoukankan      html  css  js  c++  java
  • linux: telnet

    问题: telnet: connect to address 192.168.1.103: Connection refused

    总结:{

      1. 需要开启telnet服务, /etc/xinetd.d/krb5-telnet

      2.telnet登录不能使用root用户,但是可以使用普通用户telnet登录之后,使用su切换到root用户.

    }

    解决问题:

    ssh 192.168.1.103

    # netstat -tnl |grep 23

    rpm -qa telnet-server

    # vi /etc/xinetd.d/telnet (我的CentOS release 5.11 (Final)是 vi /etc/xinetd.d/krb5-telnet ;  )

    把disable         = yes

    修改为:

    disable         = no

    # service xinetd restart# netstat -tnl |grep 23
    tcp        0      0 0.0.0.0:23                  0.0.0.0:*                   LISTEN

    再次尝试远程登录

    # telnet 192.168.1.103

    Trying 192.168.1.103...
    Connected to localhost (192.168.1.103).
    Escape character is '^]'.
    Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
    Kernel 2.6.9-89.EL on an x86_64
    login: root
    Password:
    Login incorrect

    总是提示密码不正确

    主机 192.168.1.103,添加一个普通用户,尝试使用普通用户登录

    [root@rac3 ~]# useradd fei
    [root@rac3 ~]# passwd fei

    [oracle@localhost ~]$ telnet 192.168.1.103
    Trying 192.168.1.103...
    Connected to localhost (192.168.1.103).
    Escape character is '^]'.
    Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
    Kernel 2.6.9-89.EL on an x86_64
    login: root
    Password:
    Login incorrect

    login: fei
    Password:

    [fei@rac3 ~]$

    使用普通用户登录后,再切换到root

    [fei@rac3 ~]$ su -

    Password:
    [root@rac3 ~]#

    原来是为了安全,限制了root用户登录。

  • 相关阅读:
    poj3718 Facer's Chocolate Dream
    codeforces 917D Stranger Trees
    uoj#349 【WC2018】即时战略
    bzoj5153 [Wc2018]州区划分
    bzoj5152 [Wc2018]通道
    loj2001[SDOI2017]树点染色
    loj2000[SDOI2017]数字表格
    Atcoder arc092
    bzoj4826[hnoi2017]影魔
    bzoj4827 [hnoi2017]礼物
  • 原文地址:https://www.cnblogs.com/mylinux/p/5717571.html
Copyright © 2011-2022 走看看