"Redis Licensing Action "
AUTH Password
requirepass
CONFIG SET requirepass password
You can use a password to protect the Redis server by setting the value of the item in the configuration file (using the command).
If password protection is turned on, after each connection to the Redis server, use the command to unlock AUTH
and unlock before you can use other Redis commands.
If the AUTH
command is given a password that password
matches the password in the configuration file, the server returns OK
and starts accepting command input.
On the other hand, if the password does not match, the server will return an error and require the client to reenter the password.
Because of the high performance of Redis, it is possible to try to guess very many passwords in a very short time, so make sure that the passwords you use are complex and long enough to avoid password guessing attacks.
# Set Password redis> CONFIG set requirepass secret_password # Set the password to secret_passwordokredis> quit # to exit and reconnect, Make the new password valid for the client [[email protected]]$ redisredis> PING # unauthenticated password, action denied (error) ERR operation not permittedredis> AUTH Wrong_password_testing # Try to enter the wrong password (error) ERR invalid passwordredis> AUTH secret_password # Enter the correct password Okredis > PING # Password verified successfully, can operate the command pong# empty password redis> CONFIG set Requirepass "" # Empty password by setting the password to null okredis> quit$ Redis # Re-entry client redis> PING # Execution command no longer requires password, empty password operation succeeded Pong
Reference: http://redis.readthedocs.org/en/latest/connection/auth.html
Redis Licensing Actions