Want to copy files/directories from one server to another using SSH?
Following are two way to copy files/directories from one server to another server over SSH.
Copy content from a directory:
scp -P < SSH port number of remote server> < files path on local server> < ip/host of remote server>:< path to copy files/directories>
e.g. scp -P 22 /home/xyz.zip www.example.com:/home/cfile/
Copy content from directory and the contents of any directory inside that directory
scp -P < SSH port number of remote server> -r < files path on local server> < ip/host of remote server>:< path to copy files/directories>
e.g. scp -P 22 -r /home/cpfiles/ www.example.com:/home/cfile/
Nice Post.. Please update more post like this.
ReplyDeleteOkay, stay connected will update more amazing tips
Delete