https://habrahabr.ru/post/204354/
bash> redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword //with ip
bash> redis-cli -s /tmp/redis.sock -p 6379 -a mysupersecretpassword //with socket
redis> AUTH mysupersecretpassword
redis> set test:1:string "my binary safe string"
OK
redis> get test:1:string
"my binary safe string"
redis> getset test:1:string "other value"
"my binary safe string"
redis> type test:1:string
string
redis> rename test:1:vlaue test:1:value
OK
redis> exists test:1:value
(integer) 1
redis> keys test:1:*
- "test:1:string"
- "test:1:value"
redis> del test:1:value
(integer) 1
redis> ttl test:1:string
(integer) -1
redis> expire test:1:string 6000
(integer) 1