SCP
scp can both push or pull files: scp SOURCE DESTINATION
Example 1: Pull a file from a remote Linux box to a Windows PC
Section titled “Example 1: Pull a file from a remote Linux box to a Windows PC”scp {{user}}@{{remote-host}}:/home/{{user}}/logs.zip C:\Users\{{user}}\Desktop\Example 2: Push a file from local pc to remote Linux box:
Section titled “Example 2: Push a file from local pc to remote Linux box:”scp foo.zip {{user}}@{{remote-host}}:/tmpExample 3: Using sshpass to provide the password to scp if not using ssh keys
Section titled “Example 3: Using sshpass to provide the password to scp if not using ssh keys”-rrecursively copy all files in a directory
sshpass -p "ssh_password" scp -r local_dir/ user@host:/home/user/