#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.
### 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
```

View file

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

View file

@ -2,7 +2,7 @@
# command info
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 check-upload ?[scb|lnd-rescue|migration]"
exit 0

View file

@ -188,9 +188,9 @@ if [ ${mode} = "cl-export-gui" ]; then
echo "*******************************************"
echo
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 "sftp ${fileowner}@${localip}:${filename} ."
echo "scp ${fileowner}@${localip}:${filename} ."
echo
echo "Use password A to authenticate file transfer."
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 "change into the directory where your cl-rescue file is and"
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 "Use ${passwordInfo} to authenticate file transfer."
echo "PRESS ENTER when upload is done"

View file

@ -198,9 +198,9 @@ if [ ${mode} = "lnd-export-gui" ]; then
echo "********************************"
echo
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 "sftp ${fileowner}@${localip}:${filename} ."
echo "scp ${fileowner}@${localip}:${filename} ."
echo "Use password A to authenticate file transfer."
echo
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 "change into the directory where your lnd-rescue file is and"
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 "Use ${passwordInfo} to authenticate file transfer."
echo "PRESS ENTER when upload is done"
@ -413,7 +413,7 @@ if [ ${mode} = "scb-export-gui" ]; then
echo "**************************************"
echo
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 "Use password A to authenticate file transfer."
echo
@ -492,7 +492,7 @@ if [ ${mode} = "scb-import-gui" ]; then
echo "To make upload open a new terminal and change,"
echo "into the directory where your lnd-rescue file is and"
echo "COPY, PASTE AND EXECUTE THE FOLLOWING COMMAND:"
echo "sftp ./channel.backup ${defaultUploadUser}@${localip}:${defaultUploadPath}/"
echo "scp ./channel.backup ${defaultUploadUser}@${localip}:${defaultUploadPath}/"
echo ""
echo "Use ${passwordInfo} to authenticate file transfer."
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 ""
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 "TLS Certificate:"
echo "sftp bitcoin@${local_ip}:/home/bitcoin/.lnd/tls.cert ./"
echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/tls.cert ./"
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`.
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:
```

View file

@ -55,7 +55,7 @@ if [ "${migrationOS}" == "raspiblitz" ]; then
echo "ON YOUR LAPTOP open a new terminal and change into"
echo "the directory where your migration file is and"
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 "Use password 'raspiblitz' to authenticate file transfer."
echo "PRESS ENTER when upload is done."