mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
Make BTCPay ssh key using safe algo
This commit is contained in:
@@ -6,7 +6,7 @@ if [ -f "$BTCPAY_SSHAUTHORIZEDKEYS" ] && [[ "$BTCPAY_SSHKEYFILE" ]]; then
|
|||||||
if ! [ -f "$BTCPAY_SSHKEYFILE" ] || ! [ -f "$BTCPAY_SSHKEYFILE.pub" ]; then
|
if ! [ -f "$BTCPAY_SSHKEYFILE" ] || ! [ -f "$BTCPAY_SSHKEYFILE.pub" ]; then
|
||||||
rm -f "$BTCPAY_SSHKEYFILE" "$BTCPAY_SSHKEYFILE.pub"
|
rm -f "$BTCPAY_SSHKEYFILE" "$BTCPAY_SSHKEYFILE.pub"
|
||||||
echo "Creating BTCPay Server SSH key File..."
|
echo "Creating BTCPay Server SSH key File..."
|
||||||
ssh-keygen -t rsa -f "$BTCPAY_SSHKEYFILE" -q -P "" -m PEM -C btcpayserver > /dev/null
|
ssh-keygen -t ed25519 -f "$BTCPAY_SSHKEYFILE" -q -P "" -m PEM -C btcpayserver > /dev/null
|
||||||
# Let's make sure the SSHAUTHORIZEDKEYS doesn't have our key yet
|
# Let's make sure the SSHAUTHORIZEDKEYS doesn't have our key yet
|
||||||
# Because the file is mounted, set -i does not work
|
# Because the file is mounted, set -i does not work
|
||||||
sed '/btcpayserver$/d' "$BTCPAY_SSHAUTHORIZEDKEYS" > "$BTCPAY_SSHAUTHORIZEDKEYS.new"
|
sed '/btcpayserver$/d' "$BTCPAY_SSHAUTHORIZEDKEYS" > "$BTCPAY_SSHAUTHORIZEDKEYS.new"
|
||||||
|
|||||||
Reference in New Issue
Block a user