Logging in with cqlsh

Create cqlshrc in your ~/.cassandra directory to pass default login information.

To avoid having to pass credentials for every login using cqlsh, you can create a cqlshrc file in your ~/.cassandra directory. When present, it passes default login information to cqlsh. For example:

Procedure

Create the cqlshrc file with the following information:
[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.
The default location of the sample files depends on the type of installation:
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