Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sftp scripts, help, can u write me how to copy files

Status
Not open for further replies.

Pitone

Programmer
Oct 12, 2004
15
IT
hi I need to know how to copy files between two sarvers (A and B) from another server C

so from C I must create a script that moves a file from A server to B server.
Let's assume the file is in the A server under /home/ciccio
and the destination folder is on server B under /home/pluto

who would help me?

Thanks!
 
I guess the obvious way is to use "scp".
You will need to ensure that sshd is installed and configured on both machines and that the shared keys are setup and then you can "scp server1:/home/ciccio/file_a server2:/hom/pluto/".
If not you may find that you can use "rcp" in a similar manner.
"scp" is secure and used on modern setups whereas "rcp" is much less secure and used on older setups. If you are on a firewalled internal network the security is unlikely to be an issue.


Trojan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top