Using cqlsh with authentication

  1. Create or modify the cqlshrc file that specifies a role name and password.

    username = fred
    password = !!bang!!$


Additional settings in the cqlshrc file are described in cqlshrc file.

  1. Save the file in home/.cassandra directory and name it cqlshrc.

  2. Set permissions on the file to prevent unauthorized access, as the password is stored in plain text. The file must be readable by the user that starts cassandra.

    chmod 440 `home/.cassandra/cqlshrc`
  3. Check the permissions on home/.cassandra/cqlshrc_history to ensure that plain text passwords are not compromised.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,