#3667 change all up/download from sftp tp scp (#3718)

This commit is contained in:
/rootzoll 2023-04-03 12:56:33 +02:00 committed by GitHub
parent a7056fc894
commit 679effcecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 23 deletions

View File

@ -480,7 +480,7 @@ Will need to pay through a peer which supports the onion messages which means yo
* If there is no such file and you have not funded the CLN wallet yet can reset the wallet and the next wallet will be created with a seed. * If there is no such file and you have not funded the CLN wallet yet can reset the wallet and the next wallet will be created with a seed.
### How to display the hsm_secret in a human-readable format? ### How to display the hsm_secret in a human-readable format?
* If there is no seed available it is best to save the hsm_secret as a file with `sftp` or note down the alphanumeric characters in the two line displayed with: * If there is no seed available it is best to save the hsm_secret as a file with `scp` or note down the alphanumeric characters in the two line displayed with:
``` ```
sudo xxd /home/bitcoin/.lightning/bitcoin/hsm_secret sudo xxd /home/bitcoin/.lightning/bitcoin/hsm_secret
``` ```

View File

@ -26,21 +26,21 @@ defaultUploadPath="/mnt/hdd/temp/migration"
# get local ip # get local ip
source <(/home/admin/config.scripts/internet.sh status local) source <(/home/admin/config.scripts/internet.sh status local)
# SFTP download and upload links # SCP download and upload links
sftpDownloadUnix="sftp -r 'bitcoin@${localip}:${defaultUploadPath}/raspiblitz-*.tar.gz' ./" downloadUnix="scp -r 'bitcoin@${localip}:${defaultUploadPath}/raspiblitz-*.tar.gz' ./"
sftpDownloadWin="sftp -r bitcoin@${localip}:${defaultUploadPath}/raspiblitz-*.tar.gz ." downloadWin="scp -r bitcoin@${localip}:${defaultUploadPath}/raspiblitz-*.tar.gz ."
sftpUploadUnix="sftp -r ./raspiblitz-*.tar.gz bitcoin@${localip}:${defaultUploadPath}" uploadUnix="scp -r ./raspiblitz-*.tar.gz bitcoin@${localip}:${defaultUploadPath}"
sftpUploadWin="sftp -r ./raspiblitz-*.tar.gz bitcoin@${localip}:${defaultUploadPath}" uploadWin="scp -r ./raspiblitz-*.tar.gz bitcoin@${localip}:${defaultUploadPath}"
# output status data & exit # output status data & exit
if [ "$1" = "status" ]; then if [ "$1" = "status" ]; then
echo "# RASPIBLITZ Data Import & Export" echo "# RASPIBLITZ Data Import & Export"
echo "localip=\"${localip}\"" echo "localip=\"${localip}\""
echo "defaultUploadPath=\"${defaultUploadPath}\"" echo "defaultUploadPath=\"${defaultUploadPath}\""
echo "sftpDownloadUnix=\"${sftpDownloadUnix}\"" echo "downloadUnix=\"${downloadUnix}\""
echo "sftpUploadUnix=\"${sftpUploadUnix}\"" echo "uploadUnix=\"${uploadUnix}\""
echo "sftpDownloadWin=\"${sftpDownloadWin}\"" echo "downloadWin=\"${downloadWin}\""
echo "sftpUploadWin=\"${sftpUploadWin}\"" echo "uploadWin=\"${uploadWin}\""
exit 1 exit 1
fi fi

View File

@ -2,7 +2,7 @@
# command info # command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "# use to prepare & check sftp or web file upload to RaspiBlitz" echo "# use to prepare & check scp or web file upload to RaspiBlitz"
echo "# blitz.upload.sh prepare-upload" echo "# blitz.upload.sh prepare-upload"
echo "# blitz.upload.sh check-upload ?[scb|lnd-rescue|migration]" echo "# blitz.upload.sh check-upload ?[scb|lnd-rescue|migration]"
exit 0 exit 0

View File

@ -188,9 +188,9 @@ if [ ${mode} = "cl-export-gui" ]; then
echo "*******************************************" echo "*******************************************"
echo echo
echo "ON YOUR MAC & LINUX LAPTOP - RUN IN NEW TERMINAL:" echo "ON YOUR MAC & LINUX LAPTOP - RUN IN NEW TERMINAL:"
echo "sftp '${fileowner}@${localip}:${filename}' ./" echo "scp '${fileowner}@${localip}:${filename}' ./"
echo "ON WINDOWS - RUN IN CMD:" echo "ON WINDOWS - RUN IN CMD:"
echo "sftp ${fileowner}@${localip}:${filename} ." echo "scp ${fileowner}@${localip}:${filename} ."
echo echo
echo "Use password A to authenticate file transfer." echo "Use password A to authenticate file transfer."
echo "Check for correct file size after transfer: ${size} byte" echo "Check for correct file size after transfer: ${size} byte"
@ -291,7 +291,7 @@ if [ ${mode} = "cl-import-gui" ]; then
echo "To make upload open a new terminal on your laptop," echo "To make upload open a new terminal on your laptop,"
echo "change into the directory where your cl-rescue file is and" echo "change into the directory where your cl-rescue file is and"
echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:" echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:"
echo "sftp -r ./cl-rescue-*.tar.gz ${defaultUploadUser}@${localip}:${defaultUploadPath}/" echo "scp -r ./cl-rescue-*.tar.gz ${defaultUploadUser}@${localip}:${defaultUploadPath}/"
echo echo
echo "Use ${passwordInfo} to authenticate file transfer." echo "Use ${passwordInfo} to authenticate file transfer."
echo "PRESS ENTER when upload is done" echo "PRESS ENTER when upload is done"

View File

@ -198,9 +198,9 @@ if [ ${mode} = "lnd-export-gui" ]; then
echo "********************************" echo "********************************"
echo echo
echo "ON YOUR MAC & LINUX LAPTOP - RUN IN NEW TERMINAL:" echo "ON YOUR MAC & LINUX LAPTOP - RUN IN NEW TERMINAL:"
echo "sftp '${fileowner}@${localip}:${filename}' ./" echo "scp '${fileowner}@${localip}:${filename}' ./"
echo "ON WINDOWS - RUN IN CMD:" echo "ON WINDOWS - RUN IN CMD:"
echo "sftp ${fileowner}@${localip}:${filename} ." echo "scp ${fileowner}@${localip}:${filename} ."
echo "Use password A to authenticate file transfer." echo "Use password A to authenticate file transfer."
echo echo
echo "Check for correct file size after transfer: ${size} byte" echo "Check for correct file size after transfer: ${size} byte"
@ -299,7 +299,7 @@ if [ ${mode} = "lnd-import-gui" ]; then
echo "To make upload open a new terminal on your laptop," echo "To make upload open a new terminal on your laptop,"
echo "change into the directory where your lnd-rescue file is and" echo "change into the directory where your lnd-rescue file is and"
echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:" echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:"
echo "sftp -r ./lnd-rescue-*.tar.gz ${defaultUploadUser}@${localip}:${defaultUploadPath}/" echo "scp -r ./lnd-rescue-*.tar.gz ${defaultUploadUser}@${localip}:${defaultUploadPath}/"
echo echo
echo "Use ${passwordInfo} to authenticate file transfer." echo "Use ${passwordInfo} to authenticate file transfer."
echo "PRESS ENTER when upload is done" echo "PRESS ENTER when upload is done"
@ -413,7 +413,7 @@ if [ ${mode} = "scb-export-gui" ]; then
echo "**************************************" echo "**************************************"
echo echo
echo "RUN THE FOLLOWING COMMAND ON YOUR LAPTOP IN NEW TERMINAL:" echo "RUN THE FOLLOWING COMMAND ON YOUR LAPTOP IN NEW TERMINAL:"
echo "sftp -r ${fileuser}@${localip}:${filename} ./" echo "scp -r ${fileuser}@${localip}:${filename} ./"
echo "" echo ""
echo "Use password A to authenticate file transfer." echo "Use password A to authenticate file transfer."
echo echo
@ -492,7 +492,7 @@ if [ ${mode} = "scb-import-gui" ]; then
echo "To make upload open a new terminal and change," echo "To make upload open a new terminal and change,"
echo "into the directory where your lnd-rescue file is and" echo "into the directory where your lnd-rescue file is and"
echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:" echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:"
echo "sftp ./channel.backup ${defaultUploadUser}@${localip}:${defaultUploadPath}/" echo "scp ./channel.backup ${defaultUploadUser}@${localip}:${defaultUploadPath}/"
echo "" echo ""
echo "Use ${passwordInfo} to authenticate file transfer." echo "Use ${passwordInfo} to authenticate file transfer."
echo "PRESS ENTER when upload is done." echo "PRESS ENTER when upload is done."

View File

@ -154,10 +154,10 @@ elif [ "${exportType}" = "sftp" ]; then
echo "The password needed during download is your Password A." echo "The password needed during download is your Password A."
echo "" echo ""
echo "Macaroons:" echo "Macaroons:"
echo "sftp bitcoin@${local_ip}:/home/bitcoin/.lnd/data/chain/${network}/${chain}net/\*.macaroon ./" echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/data/chain/${network}/${chain}net/\*.macaroon ./"
echo "" echo ""
echo "TLS Certificate:" echo "TLS Certificate:"
echo "sftp bitcoin@${local_ip}:/home/bitcoin/.lnd/tls.cert ./" echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/tls.cert ./"
echo "" echo ""
########################### ###########################

View File

@ -21,7 +21,7 @@ cp ./*.proto ./protobuffs
Now copy the generated RPC libs per SFTP over to your Laptop and add them to the `/home/admin/config.scripts/lndlibs`. Now copy the generated RPC libs per SFTP over to your Laptop and add them to the `/home/admin/config.scripts/lndlibs`.
sftp -r admin@192.168.X.X:/home/admin/protobuffs ./protobuffs scp -r admin@192.168.X.X:/home/admin/protobuffs ./protobuffs
Make sure the first lines (ignore comments) of the `lightning_pb2_grpc.py` look like the following for python3 compatibility: Make sure the first lines (ignore comments) of the `lightning_pb2_grpc.py` look like the following for python3 compatibility:
``` ```

View File

@ -55,7 +55,7 @@ if [ "${migrationOS}" == "raspiblitz" ]; then
echo "ON YOUR LAPTOP open a new terminal and change into" echo "ON YOUR LAPTOP open a new terminal and change into"
echo "the directory where your migration file is and" echo "the directory where your migration file is and"
echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:" echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:"
echo "sftp -r ./raspiblitz-*.tar.gz ${defaultUploadUser}@${localip}:${defaultUploadPath}/" echo "scp -r ./raspiblitz-*.tar.gz ${defaultUploadUser}@${localip}:${defaultUploadPath}/"
echo "" echo ""
echo "Use password 'raspiblitz' to authenticate file transfer." echo "Use password 'raspiblitz' to authenticate file transfer."
echo "PRESS ENTER when upload is done." echo "PRESS ENTER when upload is done."