码迷,mamicode.com
首页 > 其他好文 > 详细

Redis 安全性设置

时间:2016-08-09 14:55:53      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

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

 

Redis 安全性设置

标签:

原文地址:http://www.cnblogs.com/hongdada/p/5753176.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!