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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving Files 1

Status
Not open for further replies.

jo90

Programmer
Jun 19, 2002
30
GB
Hi,

Is there anyother way to transfer files between 2 servers than to use FTP? I have written a script to do this, however I am unsure about hard-coding box credentials (User name / Password)..... Also doing a chmod on the script isn't a great option I feel... I have thought of rlogin, however when I do this it simply exits my script at the rlogin prompt, is it possible to modify this? Any other thoughts on this?

Thanks,
Jo.
 
You can also use rcp which is what I currently use. Or if you have ssh installed, I *believe* there is an equivalent scp to copy with security.

The rsh method requires a .rhosts file in the root of the destination machine with an entry for the source server.

Example: if you are on Alpha and want to copy a the file file.txt to Beta, you need to have a .rhosts file on Beta. This file needs to have simply Alpha in it. You can increase security by adding the authorized user (i.e. Alpha user). Then on Alpha just type rcp Beta:/path/ file.txt. Easy

You can script this as well, and it is a nice way to move files from one box to another.

Good luck Einstein47
(How come we never see the headline, "Psychic Wins Lottery"?)
 
Thanks Einstein,

This was a most helpful post. The rcp method works great.

Jo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top