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!

Automate FTP script

Status
Not open for further replies.

ranjank

IS-IT--Management
May 9, 2003
176
IN
Hi,

I have written a script to automate FTP of files.In the script i don't want to write the passwd of the login id in the script nor asking the user for the input of passwd.Instead i want the passwd to be fetched from some file.

Any lead on this will be highly appreciated.

--RK.
 
Consider also using scp or sftp with public/private key authentication perhaps?

Annihilannic.
 
Thanks All.

I'm able to do with .netrc file.But if i want my FTP script to be run by different login id with .netrc file how it is possible.Right now .netrc has 700 permission.If different login id has to execute it then he will require the permission to read .netrc file and that will compromise the security.Is there any other way for this.

--RK.
 
Can I reinforce Annihilannic's suggestion that you look at scp and sftp with public/private key pairs. It would solve all your login issues and has the added bonus of encrypting your data as it's transferred (which keeps the auditors happy)

BTW I think that .netrc fails if the file is either group or world writable.

Columb Healy
 
.netrc should have 600 permissions to work correctly, as far as I know. Each authorised user will require a separate .netrc file in their home directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top