This command will copy files between servers – ownership of the files changes to the user you used to login to the remote server with.
This can be any user with SSH access.
tar -czf - directory/ | ssh user@remotehost "tar -xzf -"
A little bit of wisdom
This command will copy files between servers – ownership of the files changes to the user you used to login to the remote server with.
This can be any user with SSH access.
tar -czf - directory/ | ssh user@remotehost "tar -xzf -"