Paul,

It can be done with "ftp", you have to use a ".netrc" file. In the example I
upload some files:
        - "/home/<user>/.netrc":
            #!/bin/ksh
            machine <machine name>
            login <login name>
            password <password login name>
            macdef init
            cd <upload directory>
            mput <files>
            close
            bye
            <empy line>
        - In the scripts used you should put the following lines:
            cd <download directory>
            ftp -i <upload machine name>
        - The script should be executed as "<user>".
        - If passwords change they have to be changed in the scripts as well.
        - Owner of ".netrc" is "<user>" with "600" permissions.
        - Security problem is "password" in file!!!

Success,

Reinder

-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens
Paul Crossman
Verzonden: dinsdag 28 december 1999 18:18
Aan: [EMAIL PROTECTED]
Onderwerp: trying to set up unattended ftp as part of a shell script


I'm trying to write a shell script where part of the functionality is an
ftp.  How can I use ftp or a related utility so that I, or someone else
doesn't have to be there to type the password.

I tried

ftp < filename, where filename is a text file that has stuff in it that
I would type at the prompts....no go.

I also tried

ftp host.do.main < filename

I can't use anything like rsh or rcp as this is a very secure
environment that I'm working in.  Every box is locked down for the most
part.  Most of my activities have to be done via ssh.

I haven't tried sftp, but I'm pretty shure that it's not going to work.

Anyone have any suggestions???

Sincerely,
Paul C.


--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.



-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to