ssh登录

在Linux或者类linux系统下, root用户的权限很高,所以一般黑客采用字典攻击的方式来获得root的密码,从而进行一些的破坏动作。

所以一般采用如下的两种方式来避免针对root的字典攻击。

1
<br>
  1. 禁止通过ssh来登录root.通过修改文件 /etc/ssh/sshd_config 

    #PermitRootLogin yes
    将其改为
    PermitRootLogin no
  2. 允许root 通过 ssh登录,但是只能通过rsa key的方式修改 /etc/ssh/sshd_config 把下面这行

    #PermitRootLogin yes

    修改为:

    PermitRootLogin without-password

然后创建rsa key ,通过在两个机器之前配置使用key文件来登录

posted @ 2017-02-04 19:06  apelearn  阅读(178)  评论(0)    收藏  举报