Hardware key scp and rsync

trezor-agent
This is the command-line tool used to manage Trezor hardware key.
-e ed25519
This option specifies the type of cryptographic key used to authenticate the SSH connection. In this case, we are using the Ed25519 algorithm.
user@host
This specifies the username and hostname of the remote server we want to connect to.
-- scp
This option tells Trezor-agent to use the SCP protocol for file transfer.
local-file.txt
This is the path to the file we want to transfer. It should be located on the local machine.
user@server:/home/user/
This is the destination path where we want to copy the file on the remote server.

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.