How to copy a directory from local machine to remote machine

rsyncscpssh

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.

Best Answer

Easiest way is scp

scp -ra /path/to/local/storage user@remote.host:/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.