<p>I performed the scenario described, using these commands:</p>
<pre><code>// create a new wallet. Extra options are needed to not create a descriptor-based wallet, to be able to dump privkey
bitcoin-cli -testnet -rpcuser=XXX -rpcpassword=XXX createwallet &quot;test1&quot; false false &quot;&quot; false false
bitcoin-cli  ...  getwalletinfo
// generate an address
bitcoin-cli  ...  getnewaddress
--&gt; tb1qha...zxejw7
// dump its private key
bitcoin-cli  ...  dumpprivkey &quot;tb1qha...zxejw7&quot;
--&gt; cRJzVP...cZTcV5
// send some funds to this address
bitcoin-cli  ...  getwalletinfo

// in another instance, create another wallet
bitcoin-cli  ...  createwallet &quot;test2&quot; false false &quot;&quot; false false
bitcoin-cli  ...  getwalletinfo
// import privkey of previous address. This can take a long time (many minutes), due to rescanning
bitcoin-cli  ...  importprivkey &quot;cRJzVP...cZTcV5&quot;
bitcoin-cli  ...  getwalletinfo
--&gt; balance of the address shows up here
// Perform a send to another address
bitcoin-cli  ...  sendtoaddress &quot;tb1qp2...n9qw92&quot; 0.0001 &quot;&quot; &quot;&quot; true
bitcoin-cli  ...  getwalletinfo
</code></pre>

CC BY-SA 4.0
2022-10-13T15:37:34.133Z
2022-10-13T15:37:34.133Z
OptOut
<p>You can use createrawtransaction to create a raw transaction, in which you can specify your custom inputs and outputs.
In this case you would specify the input to be the address from node2, and output/outputs to be addresses you are sending bitcoins to. Use signrawtransaction to sign raw transaction it using your imported private key and sendrawtransaction to send it to the network.</p>

CC BY-SA 4.0
2019-01-31T17:37:28.240Z
2019-01-31T17:37:28.240Z
zabbir
<p>I'm trying to send bitcoins from node2 with my address <strong>using private key</strong> noted that <strong>my address</strong> is created in node1.I followed this link:
"<a href="https://en.bitcoin.it/wiki/How_to_import_private_keys" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/How_to_import_private_keys</a>" 
I dump private key in node1 using this command:</p>

<pre><code>bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 dumpprivkey "2N7YvA6ZBjFvXE3wuNQH4csev1QUWtrzYgA"
</code></pre>

<p>Then I imported private key in node2 through this command:</p>

<pre><code>bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 importprivkey cNKbGVQvQgJsJuRy25ggZ71BRA9UZyEPCMekdntnZDWjYTg9TpRu
</code></pre>

<p>now I want to send bitcoin from node2 with my address to different address</p>

<p><strong>can anyone please give me solution to make transaction using my address private key</strong>
  <strong><em>thanking you in advance</em></strong></p>

CC BY-SA 4.0
2019-01-31T07:40:34.077Z
Does this help: https://bitcoin.stackexchange.com/a/58755 ?
MCCCS
<bitcoin-core><blockchain><bitcoind><testnet>
Can I send BTC from other node or wallet with my address?
Chandu candy
# Can I send BTC from other node or wallet with my address?

(Asked by: username_0 on 2019-01-31)

I'm trying to send bitcoins from node2 with my address using private key noted that my address is created in node1.I followed this link:
"https://en.bitcoin.it/wiki/How_to_import_private_keys" 
I dump private key in node1 using this command:
bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 dumpprivkey "2N7YvA6ZBjFvXE3wuNQH4csev1QUWtrzYgA"

Then I imported private key in node2 through this command:
bitcoin-cli -testnet -rpcuser=test -rpcpassword=test123 importprivkey cNKbGVQvQgJsJuRy25ggZ71BRA9UZyEPCMekdntnZDWjYTg9TpRu

now I want to send bitcoin from node2 with my address to different address
can anyone please give me solution to make transaction using my address private key
thanking you in advance

**Tags:** bitcoin-core, blockchain, bitcoind, testnet

> **Comments:**
> **username_1**: Does this help: https://bitcoin.stackexchange.com/a/58755 ?  

---

## 2 answers

### Answer by username_2 on 2022-10-13. Score: 1

I performed the scenario described, using these commands:
// create a new wallet. Extra options are needed to not create a descriptor-based wallet, to be able to dump privkey
bitcoin-cli -testnet -rpcuser=XXX -rpcpassword=XXX createwallet "test1" false false "" false false
bitcoin-cli  ...  getwalletinfo
// generate an address
bitcoin-cli  ...  getnewaddress
--> tb1qha...zxejw7
// dump its private key
bitcoin-cli  ...  dumpprivkey "tb1qha...zxejw7"
--> cRJzVP...cZTcV5
// send some funds to this address
bitcoin-cli  ...  getwalletinfo

// in another instance, create another wallet
bitcoin-cli  ...  createwallet "test2" false false "" false false
bitcoin-cli  ...  getwalletinfo
// import privkey of previous address. This can take a long time (many minutes), due to rescanning
bitcoin-cli  ...  importprivkey "cRJzVP...cZTcV5"
bitcoin-cli  ...  getwalletinfo
--> balance of the address shows up here
// Perform a send to another address
bitcoin-cli  ...  sendtoaddress "tb1qp2...n9qw92" 0.0001 "" "" true
bitcoin-cli  ...  getwalletinfo


---

### Answer by username_3 on 2019-01-31. Score: 0

You can use createrawtransaction to create a raw transaction, in which you can specify your custom inputs and outputs.
In this case you would specify the input to be the address from node2, and output/outputs to be addresses you are sending bitcoins to. Use signrawtransaction to sign raw transaction it using your imported private key and sendrawtransaction to send it to the network.


---

