Create a wallet starting from a 24 words seed phrase (cardano-cli and cardano-address or cardano-wallet binaries are required for this script).
Save the following script as wallet.sh inside the ~/stake-pool-files/keys folder and execute it:
#!/bin/bashNET="testnet"NET_WITH_MAGIC="--testnet-magic 2"# create a new walletcardano-addressrecovery-phrasegenerate>phrase.prvchmod400phrase.prvcatphrase.prv|cardano-addresskeyfrom-recovery-phraseShelley>rootkey.prvchmod400rootkey.prvcatrootkey.prv|cardano-addresskeychild1852H/1815H/0H/2/0>stake.prvcardano-clikeyconvert-cardano-address-key--signing-key-filestake.prv--shelley-stake-key--out-filestake.skeycardano-clikeyverification-key--signing-key-filestake.skey--verification-key-fileExt_ShelleyStake.vkeycardano-clikeynon-extended-key--extended-verification-key-fileExt_ShelleyStake.vkey--verification-key-filestake.vkeycardano-clistake-addressbuild--stake-verification-key-filestake.vkey--out-filestake.addr ${NET_WITH_MAGIC}rmExt_ShelleyStake.vkeystake.prvcatrootkey.prv|cardano-addresskeychild1852H/1815H/0H/0/0>payment.prvcardano-clikeyconvert-cardano-address-key--signing-key-filepayment.prv--shelley-payment-key--out-filepayment.skeycardano-clikeyverification-key--signing-key-filepayment.skey--verification-key-fileExt_ShelleyPayment.vkeycardano-clikeynon-extended-key--extended-verification-key-fileExt_ShelleyPayment.vkey--verification-key-filepayment.vkeycardano-cliaddressbuild--payment-verification-key-filepayment.vkey--stake-verification-key-filestake.vkey--out-filepayment.addr ${NET_WITH_MAGIC}rmExt_ShelleyPayment.vkeypayment.prv
The recovery words will be saved in the phrase.prv file. Write them down somewhere safe for future reference and as backup.