Wednesday, November 3, 2021

[SOLVED] How to copy a directory from local machine to remote machine

Issue

I am using ssh to connect to a remote machine.

Is there a way i can copy an entire directory from a local machine to the remote machine?

I found this link to do it the other way round i.e copying from remote machine to local machine.


Solution

Easiest way is scp

scp -ra /path/to/local/storage [email protected]:/path/to/copy

rsync is best for when you want to update versions where it has been previously copied.

If that doesn't work, rerun with -v and see what the error is.



Answered By - Oliver Matthews