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

Shell using ftp to copy a file between 2 machines on a network

Status
Not open for further replies.

joemama613

IS-IT--Management
Joined
May 14, 2003
Messages
66
Location
US
I need to create a shell using ftp to copy a file from one machine to another on the same network. I will ultimately use crontab, which I am familiar with.

I toyed with the project using the .netrc file, but can not seem to automate the entire process. I still need to enter a password manually.

Can anyone help?

Thanks,

Joe
 
Your .netrc file may not be working due to permissions. Make sure its permissions are 600 (-rw-------) as it contains passwords and other users shouldn't be able to read it.

Also look into the ftp -n option, which will prevent it from attempting to log in straight away. You can then include user username password in the script of FTP commands you pass to it to perform the actual login.

Similarly if your script is going to contain a password make sure it's properly secured.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top