Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssdb访问安全性 #692

Closed
lzn993 opened this issue Jun 1, 2015 · 7 comments
Closed

ssdb访问安全性 #692

lzn993 opened this issue Jun 1, 2015 · 7 comments

Comments

@lzn993
Copy link

lzn993 commented Jun 1, 2015

您好,请问如何给ssdb添加密码认证,我看配置文件中有这个信息,但是找不到相关的使用说明,不知道如何配置。

@ideawu
Copy link
Owner

ideawu commented Jun 1, 2015

只需要把配置打开即可, 把 very-strong-password 改成你自己的密码.

    # auth password must be at least 32 characters
    auth: very-strong-password

使用示例:

<?php
require_once('SSDB.php');
$ssdb = new SimpleSSDB('127.0.0.1', 8888);
$ssdb->auth('your password here');
$resp = $ssdb->set('key', '123');
$resp = $ssdb->get('key');
echo $resp; // output: 123

@lzn993
Copy link
Author

lzn993 commented Jun 1, 2015

非常感谢

@lzn993 lzn993 closed this as completed Jun 1, 2015
@lzn993 lzn993 reopened this Jun 1, 2015
@lzn993
Copy link
Author

lzn993 commented Jun 1, 2015

SSDB设置了密码认证之后,使用ssdb-cli工具、ssdb-dump工具都无法连接SSDB了,错误信息如下所示,请问设置了密码认证之后,这2个工具该如何使用。
Failed to connect to: 58.96.186.81:8888
Connection error: [Errno 111] Connection refused

@ideawu
Copy link
Owner

ideawu commented Jun 2, 2015

命令自己有帮助, 请多看帮助和文档.

@ideawu ideawu closed this as completed Jun 2, 2015
@GuocaiTang
Copy link

SSDB设置了密码认证之后,使用ssdb-cli工具、ssdb-dump工具都无法连接SSDB了,错误信息如下所示,请问设置了密码认证之后,这2个工具该如何使用。
Failed to connect to: 58.96.186.81:8888
Connection error: [Errno 111] Connection refused

请问会用了吗,我在配置文件里设置密码后就连接不上了

@lzn993
Copy link
Author

lzn993 commented Jun 12, 2020 via email

@PleijaEternal
Copy link

PleijaEternal commented Dec 14, 2021

/usr/local/ssdb/ssdb-cli -h 127.0.0.1 -p 8888
连接上以后执行
ssdb 127.0.0.1:8888>AUTH 你的密码
https://ssdb.io/docs/zh_cn/commands/auth.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants