[root@iZ2ze4vu541eoc2qjceilkZ ~]# redis-cli -h xxx -p xxx -a xxx
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
警告在命令中密码以明文写出来
直接使用命令登录,屏蔽错误信息
由于告警信息是标准错误,我们可以将标准错误的输出信息输出为空
[root@iZ2ze4vu541eoc2qjceilkZ ~]# redis-cli -h xxx -p xxx -a xxx 2>/dev/null
xxx:xxx>