Logging in with cqlsh
Create a cqlshrc file to pass default login information.
To avoid having to pass credentials for every login using cqlsh, you can create a cqlshrc file your ~/.cassandra directory. When present, it passes default login information to cqlsh. For example:
Procedure
Create the cqlshrc file with the following in
formation:
[authentication] username = username password = password
Be sure to set the correct permissions and secure this file so that no unauthorized users can gain access to database login information.
Note: Sample cqlshrc files are available in the following
directories:
- Packaged installs: /usr/share/doc/dse-libcassandra
- Tarball installs: install_location/resources/cassandra/conf