Copy files to remote server

From vpsget wiki
Revision as of 13:17, 13 November 2014 by Ndi (talk | contribs)
Jump to: navigation, search

How to copy files to remote server using command line

1. Rsync. We are assuming that the ssh keys are already configured.

rsync -av -e 'ssh -p22' /path/to/file IP:/path

2. Scp

scp -P 22 /path/to/file username@remoteserver.tld:/path/to/remote/directory/

Add -r for recursive (copy all directory with subdirs):

scp -r -P 22 /path/to/file username@remoteserver.tld:/path/to/remote/directory/