標籤:
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 foobaredrequirepass hongda$123456
設定requirepass就可以
接下來要重啟Redis服務
用戶端授權方式
(1)登入時使用-a參數指定用戶端密碼,如下
(2)登入用戶端後使用auth命令進行授權,如下
http://www.cnblogs.com/hjwublog/p/5660578.html
Redis 安全性設定