redis cli connect to remote code example
Example 1: redis-cli port host
$ redis-cli -h redis15.localnet.org -p 6390 ping
PONG
Example 2: redis cli connect to remote server with password
$redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword
$ redis-cli -h redis15.localnet.org -p 6390 ping
PONG
$redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword