05 October, 2021

Linux

liton

359 views


On server A:

$ scp -r /path/to/directory someuser@serverB:/path/to/files/.

The above command will copy the files from serverA to serverB using someuser (a user on serverB). The directory (/path/to/directory) will be copied as a directory to the directory on serverB into the directory /path/to/files/

source:

https://superuser.com/questions/608141/how-to-transfer-entire-directory-from-one-server-to-another-via-sshsource: