Launch Cosmos App on your ledger device and visit wallet, login by clicking on 'Unlock with Ledger' button and follow instructions appear on your screen.
To add account to dncli use next command:
dncli keys add my-account --index 0 --ledger
It will add a new account to your ledger, if you need another account just increase the index parameter.
Also, if you want to sign something with dncli, for example, your validator creation transaction from remote server, you can just generate that transaction by adding
--generate-onlyflag and use signer address in
--fromflag, for example:
dncli tx staking create-validator ..... --generate-only --from [adress] > tx.json
See generated transaction:
You can sign and broadcast the transaction using dncli from your local machine:
# sign transaction
dncli sign tx.json --from [address] > signed.json
# broadcast transaction
dncli tx broadcast signed.json