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:
- Package installations: /etc/dse/cassandra
- Installer-Services installations: /usr/share/dse/resources/cassandra/conf
- Installer-No Services and Tarball installations: install_location/resources/cassandra/conf