The “accepted reply” is technically right nevertheless it’s INCORRECT in its reasoning and does not clarify that there are literally 2 RPC auth strategies for bitcoind (which bitcoin-cli communicates with).
The commandline -rpcuser and -rpcpassword are NOT FOR rpcauth accounts. That is the primary downside that was by no means talked about within the accepted reply.
It additionally failed to say that you just can’t use rpcauth creds from the bitcoin-cli command line app. Bitcoind has 2 RPC auth strategies, just one of them is out there through command line and that is the previous one which’s going to be eliminated. After that, you are screwed. No extra command line entry to bitcoind through bitcoin-cli (like that makes any sense …). You will need to create your personal script and connect with it over the RPC port with out using bitcoin-cli from what I can inform.
For now it’s important to use rpcuser and rpcpass both on the command line or in bitcoin.conf file. Maybe rpcauth help shall be added to the command line sooner or later for however in the meanwhile, it does not appear as if that is going to occur.
Anyway if anybody can really present an actual reply to this (that makes use of rpcauth from the bitcoin-cli command line app), be at liberty. I see no means to make use of rpcauth from command line bitcoin-cli in the meanwhile. It appears like https://github.com/bitcoin/bitcoin/blob/grasp/share/rpcauth/rpcauth.py goes to switch it however at present all it does is generate passwords. That is fairly ineffective so far as really utilizing any pre-built command line apps for speaking with bitcoind is anxious.
