Title: How to send passphrase to bitcoin core using bitcoin-cli? Post by: p100 on April 08, 2017, 05:17:36 PM How to send passphrase to bitcoin core using bitcoin-cli in Linux terminal? I've got my decrypted wallet and would like to check which of the passwords is correct by sending passphrases via bitcoin-cli. What commands should I use? Thanks.
Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: jackg on April 08, 2017, 10:53:18 PM How to send passphrase to bitcoin core using bitcoin-cli in Linux terminal? I've got my decrypted wallet and would like to check which of the passwords is correct by sending passphrases via bitcoin-cli. What commands should I use? Thanks. Isn't the password stored in the config file, do you have access to that? If not, you'll probably have to create one and assign a number to the variable for the password each time based on the command line commands. Code: rpcpassword=<your password> Also you should be able to run that as a cli command: bitcoin-qt -rpcpassword=<your password> and see if it loads. Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: achow101 on April 09, 2017, 05:05:03 AM How to send passphrase to bitcoin core using bitcoin-cli in Linux terminal? I've got my decrypted wallet and would like to check which of the passwords is correct by sending passphrases via bitcoin-cli. What commands should I use? Thanks. Do you mean the password that you use to unlock an encrypted wallet?If so, you have to use Code: walletpassphrase <passphrase> <timeout> Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: p100 on April 09, 2017, 08:30:28 AM Yes, I ment password to unlock the wallet. Achow101 - thanks, it worked!
Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: columbo on October 24, 2017, 04:16:42 PM Is there a safer way to not post the password directly on command line?
This command is also stored on bash history, and it would require removing the history file every time you decrypt your wallet for a short period of time. Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: achow101 on October 24, 2017, 06:23:00 PM Is there a safer way to not post the password directly on command line? Use bitcoin-cli with the -stdin parameter. The parameters will then be entered on stdin after you enter the command, one on each line. This keeps it out of the bash history. So you would do something like This command is also stored on bash history, and it would require removing the history file every time you decrypt your wallet for a short period of time. Code: $ bitcoin-cli -stdin walletpassphrase Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: columbo on October 25, 2017, 09:21:56 AM Is there a safer way to not post the password directly on command line? Use bitcoin-cli with the -stdin parameter. The parameters will then be entered on stdin after you enter the command, one on each line. This keeps it out of the bash history. So you would do something like This command is also stored on bash history, and it would require removing the history file every time you decrypt your wallet for a short period of time. Code: $ bitcoin-cli -stdin walletpassphrase Thank you. However, although this won't save the password to history, even with -stdin, the password gets displayed without any encryption on the screen. Is there a workaround to this? And one more thing. I noticed that the newest version of bitcoin core has support for multiple wallets. How do I set this up to have for example 5 different wallets but all using the same blockchain, so basically I do not want to download the entire blockchain again and store the blockchain 5 times, I only need the bitcoin-cli or the RPC to view / spend bitcoins from any wallet I want. Are there specific bitcoin-cli commands that are useful for selecting the wallet file I want to use? Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: achow101 on October 25, 2017, 03:07:40 PM Thank you. However, although this won't save the password to history, even with -stdin, the password gets displayed without any encryption on the screen. Is there a workaround to this? Once you get the data you need, you can do clear a bunch of times.And one more thing. I noticed that the newest version of bitcoin core has support for multiple wallets. How do I set this up to have for example 5 different wallets but all using the same blockchain, so basically I do not want to download the entire blockchain again and store the blockchain 5 times, I only need the bitcoin-cli or the RPC to view / spend bitcoins from any wallet I want. Are there specific bitcoin-cli commands that are useful for selecting the wallet file I want to use? Start Bitcoin Core with as many -wallet=<wallet name> arguments (or add them to your bitcoin.conf file) as you want wallets to use. When you use bitcoin-cli with any wallet related command, you will need to use the -rpcwallet=<walet name> argument to specify the wallet that you want to use. For example, you might doCode: $ bitcoind -daemon -wallet=wallet1 -wallet=wallet2 Code: $ bitcoin-cli -rpcwallet=wallet1 getwalletinfo Title: Re: How to send passphrase to bitcoin core using bitcoin-cli? Post by: LoyceV on October 27, 2017, 09:49:54 AM Is there a safer way to not post the password directly on command line? Kill Bash, it won't update .bash_history:This command is also stored on bash history, and it would require removing the history file every time you decrypt your wallet for a short period of time. Code: kill -9 $$ Thank you. However, although this won't save the password to history, even with -stdin, the password gets displayed without any encryption on the screen. Is there a workaround to this? I feel you, when I use walletpassphrase in Debug window Console. I just use it as a reminder to never enter my password with anybody around. |