Advertisement

Linux中遇到的问题以及解决方法

阅读量:

文章目录

          • 1. WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
          • 2. vim不显示行号
          • 3. kex_exchange_identification: read: Connection reset by peer
          • 4. 安装的系统中没有killall命令
          • 5. yum-config-manager命令找不到
          • 6. 无法处理的错误消息:GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed:Unix process subject does not have uid set
        • 7. possible unquoted pattern after predicate `-name'?

1. WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
复制代码
    thanlon@vivobook:~$ ssh root@106.12.115.136
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the ECDSA key sent by the remote host is
    SHA256:o88McdHCBge0yQj73KghQpeo7cil+JXFd8HJ+Mb+MAU.
    Please contact your system administrator.
    Add correct host key in /home/thanlon/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /home/thanlon/.ssh/known_hosts:1
      remove with:
      ssh-keygen -f "/home/thanlon/.ssh/known_hosts" -R "106.12.115.136"
    ECDSA host key for 106.12.115.136 has changed and you have requested strict checking.
    Host key verification failed.
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    

解决方法:删除这个文件thanlon@vivobook:~$ rm -f /home/thanlon/.ssh/known_hosts,如果是Wimdows系统,根据提示找答这个文件也是删除即可。


2. vim不显示行号

问题:其实这也不是问题,只是说可能不知道如何设置
解决方式:命令行模式下输入set number命令就会出现。如果想隐藏行号,可以输入set nonumber
在这里插入图片描述


3. kex_exchange_identification: read: Connection reset by peer

问题来源:在使用ssh连接云服务器的时候出现"被对方重置连接"的问题
解决方法:首先使用云服务器控制台上的vlc方式登录服务器,然后修改ssh的配置文件并重启ssh服务。具体解决步骤如下:

复制代码
    [root@slave01 ~]# vim/etc/hosts.allow
    ➢ 在注释的下面添加ssh:ALL,注意冒号要使用中文的!!!
    # hosts.allow   This file contains access rules which are used to
    #               allow or deny connections to network services that
    #               either use the tcp_wrappers library or that have been
    #               started through a tcp_wrappers-enabled xinetd.
    #
    #               See 'man 5 hosts_options' and 'man 5 hosts_access'
    #               for information on rule syntax.
    #               See 'man tcpd' for information on tcp_wrappers
    sshd:ALL
    # 重启ssh服务(一定要重启)
    [root@slave01 ~]# systemctl restart sshd
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
    

4. 安装的系统中没有killall命令

问题来源:centos7精简版安装的系统中安装killall报没有该命令
解决方法:使用 yum install psmisc -y 安装即可。


5. yum-config-manager命令找不到

问题来源:centos 7中添加镜像源的时候报找不到yum-config-manager命令
解决方法:使用 yum -y install yum-utils 安装即可。


6. 无法处理的错误消息:GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed:Unix process subject does not have uid set

问题来源:Ubuntu系统损坏后,通过U盘中的Ubuntu系统去取本地数据,当进入用户目录时报错
解决方法:执行 sudo chmod 755 用户名 给当前用户赋予可读可写可执行的权限。


7. possible unquoted pattern after predicate `-name’?

问题来源:使用find命令执行 find ./ -name *.txt 报错
解决方法:应该加上引号 find ./ -name '*.txt'


全部评论 (0)

还没有任何评论哟~