Saturday 13 September 2014

Want to copy files/directories from one server to another using SSH?

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/


2 comments:

  1. Nice Post.. Please update more post like this.

    ReplyDelete
    Replies
    1. Okay, stay connected will update more amazing tips

      Delete

Enable 'HTML Manager'- Apache Tomcat

 Enable 'HTML Manager'- Apache Tomcat Go to Apache-tomcat's home directory and edit the tomcat-users.xml ${apache_home}/conf/tom...