ApsaraDB for Redis supports password-free access in Virtual Private Cloud (VPC). This mode provides a secure and more convenient method to connect to the database. To enable password-free access, make sure that the clients and ApsaraDB for Redis instances reside within the same VPC. This way, the clients can access ApsaraDB for Redis instances without using a password. The username and password can also be used to connect to the ApsaraDB for Redis instances.
- By default, after password-free access is enabled, you can use the account that has the same name as the instance ID, such as r-bp1zxszhcgatnx****, to connect to the ApsaraDB for Redis instance. This account has read and write permissions to the instance.
- To ensure security, the password is still required when you connect to an ApsaraDB
for Redis instance by using a public endpoint after password-free access is enabled.
Note If you cannot connect to an ApsaraDB for Redis instance by using a public endpoint, you can upgrade the minor version of the instance to the latest version. For more information, see Upgrade the minor version.
- To connect to an ApsaraDB for Redis instance without a password, make sure that the
client and the instance reside within the same VPC. The VPC IP address of the client
must be added to a whitelist of the instance. For more information, see Set IP address whitelists.
Note To ensure security, do not enter 0.0.0.0/0 in whitelists. This CIDR block enables all access to the instance.
- Log on to the ApsaraDB for Redis console.
- On the top of the page, select the region where the instance is deployed.
- On the Instances page, click the Instance ID of the instance.
- On the right side of Connection Information, click Enable Password-free Access.
- In the message that appears, read the prompt and click OK.After you refresh the page, the Enable Password-free Access button changes to Disable Password-free Access. You can click this button to disable password-free access.Note If the password-free access feature is disabled, clients that are connected to the ApsaraDB for Redis instance can no longer connect to the instance. To avoid affecting client connection, you must change the authentication mode of the clients to the username and password.
Password-free connection example
redis-cli -h <host> -p <port>command to connect to your client without a password, such as
redis -h r-bp10noxlhcoim2****.redis.rds.aliyuncs .com -p 6379.
For more information, see Use redis-cli to connect to ApsaraDB for Redis.
|ModifyInstanceVpcAuthMode||Specifies whether to enable password-free access in VPC.|