how to dump private key from multisig address how to dump private key from multisig address ?
I tried with dumpprivkey RPC function but return error : Address does not refer to a key
You can't dump the private key for a multisig address because there are multiple key pairs (thus multiple possible private keys) assigned to the address. You need to specify which key pair you want. First, get the public keys belonging to that address by using:

$ bitcoin-cli getaddressinfo &lt;your address&gt;

{
  "address": "&lt;your address&gt;",
  ...
  "embedded": {
    ...
    "pubkeys": [
      "&lt;pubkey 1&gt;",
      "&lt;pubkey n&gt;",
      "..."
    ],
   ...
}


Assuming you want the private key corresponding to &lt;pubkey 1&gt;, you can convert it to a simple P2PKH address and then use dumpprivkey, for example:

$ hash160 &lt;pubkey 1&gt;
  &lt;pubkey 1 hash&gt;
$ echo 00&lt;pubkey 1 hash&gt; | xxd -r -p | base58 -c
  &lt;P2PKH address&gt;
$ bitcoin-cli dumpprivkey &lt;P2PKH address&gt;
  &lt;privkey&gt;


Where hash160 is just a bash script that uses openssl:

#!/bin/bash
## Command Line parsing
#######################

if [[ $# -lt 1 ]]; then
    echo "Usage: $ hash160 &lt;input-hex&gt;"
    exit 1
fi

inputHex=$1

hash1="$(printf $inputHex | xxd -r -p | openssl sha256 | cut -c 10-)"
printf $hash1 | xxd -r -p | openssl ripemd160 | cut -c 10-