For multisig to work, ALL wallets allowed to sign a transaction have to be created with the XPUB of the other signatory wallets.
In a 2-2 arrangement:
- A has to have XPUB of B
- B has to have XPUB of A
In a 2-3 arrangement:
- A has to have XPUB of B and C
- B has to have XPUB of A and C
- C has to have XPUB of A and B
By doing this, all the wallets that are part of the multisig arrangement will generate the exact same bitcoin addresses. This is how you can check if your multisig system will work.
With Electrum, to my knowledge, you have to use the GUI windows to create multisig wallets - ie. I haven't seen any command line to create them.
I was just wondering about using Linux's pubkey on the Windows UI, thanks for clearing that out.
I hope it will be possible to create a multisig wallet via command line in the future, that would be a nice 2FA system.