zoukankan      html  css  js  c++  java
  • Redis 安全性设置

    redis安装好后,默认情况下登陆客户端和使用命令操作时不需要密码的。某些情况下,为了安全起见,我们可以设置在客户端连接后进行任何操作之前都要进行密码验证。

    我这边是安装的window系统,修改redis.windows.conf配置文件

    # Require clients to issue AUTH <PASSWORD> before processing any other
    # commands.  This might be useful in environments in which you do not trust
    # others with access to the host running redis-server.
    #
    # This should stay commented out for backward compatibility and because most
    # people do not need auth (e.g. they run their own servers).
    # 
    # Warning: since Redis is pretty fast an outside user can try up to
    # 150k passwords per second against a good box. This means that you should
    # use a very strong password otherwise it will be very easy to break.
    #
    # requirepass foobared
    requirepass hongda$123456

    设置requirepass就可以

    接下来要重启Redis服务

    客户端授权方式

    (1)登录时使用-a参数指定客户端密码,如下

    (2)登录客户端后使用auth命令进行授权,如下

    http://www.cnblogs.com/hjwublog/p/5660578.html

  • 相关阅读:
    java9新特性-9-语法改进:try语句
    10.04 FZSZ模拟Day1 总结
    10.03模拟总结
    HNOI2012 永无乡
    ZJOI2007 报表统计
    HNOI2004 宠物收养场
    HNOI2002 营业额统计
    Splay 区间反转
    Splay基本操作
    HEOI2016 树
  • 原文地址:https://www.cnblogs.com/hongdada/p/5753176.html
Copyright © 2011-2022 走看看