Accessing your Vault
Get a password
dcli p mywebsite
dcli p mywebsite -f login
dcli p mywebsite -f email -o console
dcli p mywebsite -o json
dcli p id=xxxxxx
dcli p url=someurl title=mytitle
dcli p url,title=mywebsite
Note: You can select a different output for passwords among clipboard, console, json
. The JSON option outputs all the matching credentials.
Get the email or login of a password
You can get the email or username of a password by using the --field
or -f
parameter:
dcli password -f email mywebsite
dcli password -f login mywebsite
Generate an OTP code
You can get an OTP code from your vault as well as the remaining time before it expires.
dcli password -f otp mywebsite
Get a secure note
In order to get a secure note, just use the note
or n
command and define some filters (similarly to the password command).
You can also select a different output for notes among text, json
. The JSON option outputs all the matching notes.
dcli note [filters]
# Example with a JSON output
dcli note title=sample.md -o json
Get a secret
Dashlane introduced the secret content type. You can use it to store any kind of secret data in your vault.
In order to get a secret, just use the secret
command and define some filters (similarly to the secure note command).
You can also select a different output for notes among text, json
. The JSON option outputs all the matching notes.
dcli secret [filters]
dcli secret title=api_keys -o json
Options
By default an automatic synchronization is performed once per hour. You can change this behavior with the following command:
dcli configure disable-auto-sync true
Use cases
Use SSH Keys from your vault
This use case shows you how to use Dashlane to store your SSH keys and use them to connect to your servers. This could be useful if you want to share SSH keys with your team.
Let’s say you have generated a new SSH key pair and you want to store it in Dashlane.
ssh-keygen -t rsa -b 4096 -C "Dashlane SSH demo key"
Copy the private key to your clipboard and store it in a new secure note (named SSH_DEMO_KEY
in our example) in Dashlane via the extension.
It is important to include the headers of the key (-----BEGIN PRIVATE KEY-----
and -----END PRIVATE KEY-----
) in the secure note.
Now, make sure your CLI is synchronized:
dcli sync
Once done, you can retrieve the private key from your vault and inject it in your SSH agent:
dcli n SSH_DEMO_KEY | ssh-add -