Hardware key scp and rsync
To transfer a file using SCP, use the following command:
trezor-agent -e ed25519 user@host -- scp local-file.txt user@hiddenssh.com:/home/user/file.txt
To transfer files using rsync, we can use the same syntax as above but with a different command.
Rsync is a powerful utility that synchronizes files between local and remote systems.
trezor-agent -e ed25519 user@host -- rsync -avzP local-directory/ user@server:/home/user/remote-directory/
Here, we are using the rsync command instead of scp. The -avzP
options tell rsync to archive the files, show progress during transfer, and compress the data to optimize the transfer.
This command will copy the contents of local-directory/
to the remote-directory/
on the remote server.
If the destination directory does not exist, rsync will create it.